diff --git a/catalog-rest-service/src/main/resources/ui/src/axiosAPIs/taskAPI.ts b/catalog-rest-service/src/main/resources/ui/src/axiosAPIs/taskAPI.ts index 1d0cc6ca6ac..73f10760dea 100644 --- a/catalog-rest-service/src/main/resources/ui/src/axiosAPIs/taskAPI.ts +++ b/catalog-rest-service/src/main/resources/ui/src/axiosAPIs/taskAPI.ts @@ -1,5 +1,5 @@ import { AxiosResponse } from 'axios'; -import { Task } from '../generated/entity/data/task'; +import { Task } from '../generated/entity/data/pipeline'; import { getURLWithQueryFields } from '../utils/APIUtils'; import APIClient from './index'; diff --git a/catalog-rest-service/src/main/resources/ui/src/generated/api/data/createPipeline.ts b/catalog-rest-service/src/main/resources/ui/src/generated/api/data/createPipeline.ts index f12034d37f5..2f0ee29b433 100644 --- a/catalog-rest-service/src/main/resources/ui/src/generated/api/data/createPipeline.ts +++ b/catalog-rest-service/src/main/resources/ui/src/generated/api/data/createPipeline.ts @@ -64,7 +64,7 @@ export interface CreatePipeline { /** * All the tasks that are part of pipeline. */ - tasks?: EntityReference[]; + tasks?: Task[]; } /** @@ -152,3 +152,45 @@ export enum State { Confirmed = 'Confirmed', Suggested = 'Suggested', } + +export interface Task { + /** + * Description of this Task. + */ + description?: string; + /** + * Display Name that identifies this Task. It could be title or label from the pipeline + * services. + */ + displayName?: string; + /** + * All the tasks that are downstream of this task. + */ + downstreamTasks?: string[]; + /** + * A unique name that identifies a pipeline in the format + * 'ServiceName.PipelineName.TaskName'. + */ + fullyQualifiedName?: string; + /** + * Name that identifies this task instance uniquely. + */ + name: string; + /** + * Tags for this task. + */ + tags?: TagLabel[]; + /** + * SQL used in the task. Can be used to determine the lineage. + */ + taskSQL?: string; + /** + * Type of the Task. Usually refers to the class it implements. + */ + taskType?: string; + /** + * Task URL to visit/manage. This URL points to respective pipeline service UI. + */ + taskUrl?: string; + id: any; +} diff --git a/catalog-rest-service/src/main/resources/ui/src/generated/api/data/createTask.ts b/catalog-rest-service/src/main/resources/ui/src/generated/api/data/createTask.ts deleted file mode 100644 index 22921d450b9..00000000000 --- a/catalog-rest-service/src/main/resources/ui/src/generated/api/data/createTask.ts +++ /dev/null @@ -1,158 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Create Task entity request - */ -export interface CreateTask { - /** - * Description of the task instance. What it has and how to use it. - */ - description?: string; - /** - * Display Name that identifies this Task. It could be title or label from the pipeline - * services - */ - displayName?: string; - /** - * All the tasks that are downstream of this task. - */ - downstreamTasks?: string[]; - /** - * End date of the task - */ - endDate?: Date; - /** - * Name that identifies this Task. - */ - name: string; - /** - * Owner of this Task - */ - owner?: EntityReference; - /** - * Link to the pipeline service where this task is used - */ - service: EntityReference; - /** - * Start date of the task - */ - startDate?: Date; - /** - * Tags for this chart - */ - tags?: TagLabel[]; - /** - * SQL used in the task. Can be used to determine the lineage - */ - taskSQL?: string; - /** - * Type of the Task. Usually refers to the class it implements - */ - taskType?: string; - /** - * Task URL to visit/manage. This URL points to respective pipeline service UI - */ - taskUrl?: string; -} - -/** - * Owner of this Task - * - * This schema defines the EntityReference type used for referencing an entity. - * EntityReference is used for capturing relationships from one entity to another. For - * example, a table has an attribute called database of type EntityReference that captures - * the relationship of a table `belongs to a` database. - * - * Link to the pipeline service where this task is used - */ -export interface EntityReference { - /** - * Optional description of entity. - */ - description?: string; - /** - * Display Name that identifies this entity. - */ - displayName?: string; - /** - * Link to the entity resource. - */ - href?: string; - /** - * Unique identifier that identifies an entity instance. - */ - id: string; - /** - * Name of the entity instance. For entities such as tables, databases where the name is not - * unique, fullyQualifiedName is returned in this field. - */ - name?: string; - /** - * Entity type/class name - Examples: `database`, `table`, `metrics`, `redshift`, `mysql`, - * `bigquery`, `snowflake`... - */ - type: string; -} - -/** - * This schema defines the type for labeling an entity with a Tag. - */ -export interface TagLabel { - /** - * Link to the tag resource. - */ - href?: string; - /** - * Label type describes how a tag label was applied. 'Manual' indicates the tag label was - * applied by a person. 'Derived' indicates a tag label was derived using the associated tag - * relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label - * was propagated from upstream based on lineage. 'Automated' is used when a tool was used - * to determine the tag label. - */ - labelType?: LabelType; - /** - * 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the - * entity must confirm the suggested labels before it is marked as 'Confirmed'. - */ - state?: State; - tagFQN?: string; -} - -/** - * Label type describes how a tag label was applied. 'Manual' indicates the tag label was - * applied by a person. 'Derived' indicates a tag label was derived using the associated tag - * relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label - * was propagated from upstream based on lineage. 'Automated' is used when a tool was used - * to determine the tag label. - */ -export enum LabelType { - Automated = 'Automated', - Derived = 'Derived', - Manual = 'Manual', - Propagated = 'Propagated', -} - -/** - * 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the - * entity must confirm the suggested labels before it is marked as 'Confirmed'. - */ -export enum State { - Confirmed = 'Confirmed', - Suggested = 'Suggested', -} diff --git a/catalog-rest-service/src/main/resources/ui/src/generated/entity/data/pipeline.ts b/catalog-rest-service/src/main/resources/ui/src/generated/entity/data/pipeline.ts index 877ba7c2e3b..0290dbef7ad 100644 --- a/catalog-rest-service/src/main/resources/ui/src/generated/entity/data/pipeline.ts +++ b/catalog-rest-service/src/main/resources/ui/src/generated/entity/data/pipeline.ts @@ -86,7 +86,7 @@ export interface Pipeline { /** * All the tasks that are part of pipeline. */ - tasks?: EntityReference[]; + tasks?: Task[]; /** * Last update time corresponding to the new version of the entity. */ @@ -209,3 +209,45 @@ export enum State { Confirmed = 'Confirmed', Suggested = 'Suggested', } + +export interface Task { + /** + * Description of this Task. + */ + description?: string; + /** + * Display Name that identifies this Task. It could be title or label from the pipeline + * services. + */ + displayName?: string; + /** + * All the tasks that are downstream of this task. + */ + downstreamTasks?: string[]; + /** + * A unique name that identifies a pipeline in the format + * 'ServiceName.PipelineName.TaskName'. + */ + fullyQualifiedName?: string; + /** + * Name that identifies this task instance uniquely. + */ + name: string; + /** + * Tags for this task. + */ + tags?: TagLabel[]; + /** + * SQL used in the task. Can be used to determine the lineage. + */ + taskSQL?: string; + /** + * Type of the Task. Usually refers to the class it implements. + */ + taskType?: string; + /** + * Task URL to visit/manage. This URL points to respective pipeline service UI. + */ + taskUrl?: string; + id: any; +} diff --git a/catalog-rest-service/src/main/resources/ui/src/generated/entity/data/task.ts b/catalog-rest-service/src/main/resources/ui/src/generated/entity/data/task.ts deleted file mode 100644 index e7291b21873..00000000000 --- a/catalog-rest-service/src/main/resources/ui/src/generated/entity/data/task.ts +++ /dev/null @@ -1,208 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * This schema defines the Task entity. A task is a unit of computation in a Pipeline. - */ -export interface Task { - /** - * Change that lead to this version of the entity. - */ - changeDescription?: ChangeDescription; - /** - * Description of this Task. - */ - description?: string; - /** - * Display Name that identifies this Task. It could be title or label from the pipeline - * services. - */ - displayName?: string; - /** - * All the tasks that are downstream of this task. - */ - downstreamTasks?: string[]; - /** - * End date of the task. - */ - endDate?: Date; - /** - * A unique name that identifies a pipeline in the format - * 'ServiceName.PipelineName.TaskName'. - */ - fullyQualifiedName?: string; - /** - * Link to the resource corresponding to this entity. - */ - href?: string; - /** - * Unique identifier that identifies a task instance. - */ - id: string; - /** - * Name that identifies this task instance uniquely. - */ - name: string; - /** - * Owner of this pipeline. - */ - owner?: EntityReference; - /** - * Link to service where this pipeline is hosted in. - */ - service: EntityReference; - /** - * Start date of the task. - */ - startDate?: Date; - /** - * Tags for this Pipeline. - */ - tags?: TagLabel[]; - /** - * SQL used in the task. Can be used to determine the lineage. - */ - taskSQL?: string; - /** - * Type of the Task. Usually refers to the class it implements. - */ - taskType?: string; - /** - * Task URL to visit/manage. This URL points to respective pipeline service UI. - */ - taskUrl?: string; - /** - * Last update time corresponding to the new version of the entity. - */ - updatedAt?: Date; - /** - * User who made the update. - */ - updatedBy?: string; - /** - * Metadata version of the entity. - */ - version?: number; -} - -/** - * Change that lead to this version of the entity. - * - * Description of the change. - */ -export interface ChangeDescription { - /** - * Fields added during the version changes. - */ - fieldsAdded?: string[]; - /** - * Fields deleted during the version changes. - */ - fieldsDeleted?: string[]; - /** - * Fields modified during the version changes. - */ - fieldsUpdated?: string[]; - previousVersion?: number; -} - -/** - * Owner of this pipeline. - * - * This schema defines the EntityReference type used for referencing an entity. - * EntityReference is used for capturing relationships from one entity to another. For - * example, a table has an attribute called database of type EntityReference that captures - * the relationship of a table `belongs to a` database. - * - * Link to service where this pipeline is hosted in. - */ -export interface EntityReference { - /** - * Optional description of entity. - */ - description?: string; - /** - * Display Name that identifies this entity. - */ - displayName?: string; - /** - * Link to the entity resource. - */ - href?: string; - /** - * Unique identifier that identifies an entity instance. - */ - id: string; - /** - * Name of the entity instance. For entities such as tables, databases where the name is not - * unique, fullyQualifiedName is returned in this field. - */ - name?: string; - /** - * Entity type/class name - Examples: `database`, `table`, `metrics`, `redshift`, `mysql`, - * `bigquery`, `snowflake`... - */ - type: string; -} - -/** - * This schema defines the type for labeling an entity with a Tag. - */ -export interface TagLabel { - /** - * Link to the tag resource. - */ - href?: string; - /** - * Label type describes how a tag label was applied. 'Manual' indicates the tag label was - * applied by a person. 'Derived' indicates a tag label was derived using the associated tag - * relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label - * was propagated from upstream based on lineage. 'Automated' is used when a tool was used - * to determine the tag label. - */ - labelType?: LabelType; - /** - * 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the - * entity must confirm the suggested labels before it is marked as 'Confirmed'. - */ - state?: State; - tagFQN?: string; -} - -/** - * Label type describes how a tag label was applied. 'Manual' indicates the tag label was - * applied by a person. 'Derived' indicates a tag label was derived using the associated tag - * relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label - * was propagated from upstream based on lineage. 'Automated' is used when a tool was used - * to determine the tag label. - */ -export enum LabelType { - Automated = 'Automated', - Derived = 'Derived', - Manual = 'Manual', - Propagated = 'Propagated', -} - -/** - * 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the - * entity must confirm the suggested labels before it is marked as 'Confirmed'. - */ -export enum State { - Confirmed = 'Confirmed', - Suggested = 'Suggested', -} diff --git a/catalog-rest-service/src/main/resources/ui/src/pages/Pipeline-details/index.tsx b/catalog-rest-service/src/main/resources/ui/src/pages/Pipeline-details/index.tsx index 537536f76f7..1c384dddaaf 100644 --- a/catalog-rest-service/src/main/resources/ui/src/pages/Pipeline-details/index.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/pages/Pipeline-details/index.tsx @@ -32,8 +32,7 @@ import { getTeamDetailsPath, } from '../../constants/constants'; import { EntityType } from '../../enums/entity.enum'; -import { Pipeline } from '../../generated/entity/data/pipeline'; -import { Task } from '../../generated/entity/data/task'; +import { Pipeline, Task } from '../../generated/entity/data/pipeline'; import { User } from '../../generated/entity/teams/user'; import { EntityLineage } from '../../generated/type/entityLineage'; import { TagLabel } from '../../generated/type/tagLabel';