Creating a Lineage
Function
This API is used to create a lineage.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/lineage/lineage-info
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details about how to obtain it, see Project ID and Account ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. This parameter is mandatory if token authentication is used. You can obtain it from the value of X-Subject-Token in the response message header returned by the "Obtaining a User Token" API of the IAM service. |
| workspace | Yes | String | Workspace ID. For details about how to obtain it, see Instance ID and Workspace ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| cluster_id | No | String | Cluster ID |
| data_source_type | No | String | Data connection type |
| connection_id | No | String | Data connection ID |
| connection_name | No | String | Data connection name |
| workspace_id | No | String | Workspace ID |
| job_id | No | String | Job ID |
| node_name | No | String | Operator name |
| table_lineage | No | TableLineageV2 object | Lineage |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| input_tables | Yes | Array of TableInfoV2 objects | Upstream lineage table list. The list size ranges from 1 to 100. |
| output_tables | Yes | Array of TableInfoV2 objects | Downstream lineage table list. The list size ranges from 1 to 100. |
| column_lineages | No | Array of ColumnLineageV2 objects | Field lineage list. The list size ranges from 0 to 100. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| catalog | No | String | Catalog name |
| database | No | String | Database name |
| schema | No | String | Schema name |
| table | No | String | Table name |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| input_columns | Yes | Array of ColumnDetails objects | Upstream lineage field list. The list size ranges from 1 to 100. |
| output_columns | Yes | Array of ColumnDetails objects | Downstream lineage field list. The list size ranges from 1 to 100. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| [items] | Array of ObjectIdInfo objects | Lineage Import Result |
| Parameter | Type | Description |
|---|---|---|
| name | String | Name of a job operator. |
| type_name | String | Asset type. |
| qualified_name | String | Uniquely qualified name of a job asset. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
Example Requests
{
"cluster_id" : "actual_cluster_id",
"data_source_type" : "actual_data_source_type",
"connection_id" : "003b3ed52daf41e6829a0bc74526f5f7",
"connection_name" : "dli_test",
"workspace_id" : "1b59d3c777ad4d619b89eeac4f3cce87",
"job_id" : "testJobID",
"node_name" : "testNodeMName",
"table_lineage" : {
"input_tables" : [ {
"catalog" : "spark_catalog",
"database" : "nbbtemp",
"schema" : "",
"table" : "origndata_typeall"
} ],
"output_tables" : [ {
"catalog" : "spark_catalog",
"database" : "nbbtemp",
"schema" : "",
"table" : "lineageTable1"
} ],
"column_lineages" : [ {
"input_columns" : [ {
"database" : "nbbtemp",
"schema" : "",
"table" : "origndata_typeall",
"column" : "stringf"
} ],
"output_columns" : [ {
"database" : "nbbtemp",
"schema" : "",
"table" : "lineageTable1",
"column" : "col1"
} ]
} ]
}
} Example Responses
Status code: 200
OK
[ {
"name" : "test",
"type_name" : "Node",
"qualified_name" : "manual.a0683065-cfb6-42d3-a0ff-87b2cc5e3c79@node.0833a5737480d53b2f25c010dc1a7b88-workspace-ee119e8faee347a389e8c295b926331c"
} ] Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | BadRequest |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.