Obtaining an Asset Lineage (Invitational Test)
Function
This API is used to obtain an asset lineage. It is in invitational test and will be available for OBT in the future.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
GET /v2/{project_id}/datamap/lineage/guid/{guid}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details about how to obtain it, see Project ID and Account ID. |
| guid | Yes | String | Asset GUID. For details about how to obtain the asset GUID, see Data Asset GUID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| direction | No | String | Lineage query direction. Enumerated values include IN, OUT, and BOTH. The default value is BOTH. |
| relationship_types | No | Array of strings | Relationship types. Use the default value (null) for lineage query. Enumerated values: |
| relationship_type_categories | No | Array of strings | Relationship types. This parameter is left empty by default. The value is DATA_FLOW for lineage query. The enumerated values are as follows: |
| related_entity_types | No | Array of strings | Associated entity type, which is the type of the upstream and downstream assets. Use the default value (null) for lineage query. Enumerated values: |
| extend_process_data_flow | No | Boolean | Whether to extend data. Use the default value false for lineage query. |
| include_parent_entity | No | Boolean | Whether to include parent entities. The default value is false. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. This parameter is mandatory when 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. |
| instance | Yes | String | Instance ID. For details about how to obtain the instance ID, see Instance ID and Workspace ID. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total | Number | Total number of hit records. |
| relationships | Array of Lineage objects | Relationship list |
| relationship_types | Object | Relationship type. |
| entities | Array of Entity objects | Asset information. |
| entity_types | Object | Entity type. |
| Parameter | Type | Description |
|---|---|---|
| relation_type_name | String | Relationship type. The value can be PARENT_CHILD, LOGICAL_PHYSICAL, PK_FK, DATA_FLOW, INSTANCE_OF, JOIN, IS_A, UP_DOWN, ASSOCIATION, or WORK_FLOW. |
| direction | String | Lineage flow direction. Enumerated values: |
| ep1_id | String | Asset GUID of node 1. |
| ep1_type_name | String | Asset type of node 1. |
| ep2_id | String | Asset GUID of node 2. |
| ep2_type_name | String | Asset type of node 2. |
| end1 | Entity object | Asset of node 1. |
| end2 | Entity object | Asset of node 2. |
| propagate_tag | String | Relationship type. Enumerated values: |
| guid | String | Asset GUID. |
| type_name | String | Asset type name. |
| type_display_name | String | Type display name. |
| display_text | String | Display name. |
| attributes | Object | Asset attribute. It is a map structure and consists of a key (attribute name) and a value. |
| updated_attributes | Array of strings | List of modified attributes. |
| project_id | String | Project ID |
| domain_id | String | Main account ID. |
| instance_id | Array of strings | Instance ID. |
| workspace_id | Array of strings | Space ID list. |
| status | String | Status |
| created_by | String | Creator |
| updated_by | String | User who makes a modification. |
| create_time | String | Creation time. |
| update_time | String | Modification time. |
| Parameter | Type | Description |
|---|---|---|
| version | Number | Data version. |
| relationship_attributes | Object | Association relationship attribute. The data type is Map<String, Object>. The options are as follows: key: relationship type; value: association relationship object. |
| super_type_names | Array of strings | Parent asset type. |
| business_attributes | Object | Service attribute. The data type is Map<String, Map<String, Object>>. The options are as follows: key: service relationship type; value: service relationship. |
| multi_attributes | Object | Multi-value object data structure that bears security levels and tags. The data structure is Map<String, List<Map<String, Object>>>. key indicates the comprehensive relationship type, and value indicates the comprehensive relationship. |
| privilege_info | EntityPrivilegeInfo object | Entity privilege information. |
| extended_attributes | Object | Extended attribute. The data structure is Map<String, Object>. The key field indicates the extended attribute, and the value field indicates the extended attribute value. |
| guid | String | Asset GUID. |
| type_name | String | Asset type name. |
| type_display_name | String | Type display name. |
| display_text | String | Display name. |
| attributes | Object | Asset attribute, which is a Map<String, Object>. The key is an attribute, and value is the attribute value. |
| updated_attributes | Array of strings | List of modified attributes. |
| project_id | String | Project ID |
| domain_id | String | Main account ID. |
| instance_id | Array of strings | Instantiation ID. |
| workspace_id | Array of strings | Workspace IDs |
| status | String | Status |
| created_by | String | Creator |
| updated_by | String | User who makes a modification. |
| create_time | String | Creation time. |
| update_time | String | Modification time. |
| Parameter | Type | Description |
|---|---|---|
| privileges | Array of strings | Privilege list. |
| inherit_privileges | Array of strings | List of inherited privileges. |
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. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
Example Requests
None
Example Responses
Status code: 200
OK.
{
"total" : 1,
"relationships" : [ {
"guid" : "62c8a705-abeb-4d25-b974-854a6b97343c",
"status" : "ACTIVE",
"direction" : "IN",
"type_name" : "dataasset.tables_schema",
"type_display_name" : "Data table: mode",
"project_id" : "0833a5737480d53b2f25c010dc1a7b88",
"instance_id" : [ "dd97167b873d4a79b2aad54d4370a3bc" ],
"workspace_id" : [ "ae559f076ac14061921b6c6c331576c4", "8f91082a19474825b2fee2147e9b464c", "1b59d3c777ad4d619b89eeac4f3cce87" ],
"created_by" : "username",
"updated_by" : "username",
"create_time" : "2024-01-03T09:11:42.871+00:00",
"update_time" : "2024-01-04T11:52:36.454+00:00",
"relation_type_name" : "PARENT_CHILD",
"ep1_id" : "0c0f000e-d7b2-4aab-956c-cdc8b07083c6",
"ep2_id" : "6a1510a9-f40c-477f-ae3a-638e592b6504",
"ep1_type_name" : "dws.Table",
"ep2_type_name" : "dws.Schema",
"propagate_tag" : "NONE"
}, {
"guid" : "64d40028-10b9-41ed-811e-9c32689983eb",
"status" : "ACTIVE",
"direction" : "IN",
"type_name" : "dataasset.tables_database",
"type_display_name" : "Data table: database",
"project_id" : "0833a5737480d53b2f25c010dc1a7b88",
"instance_id" : [ "dd97167b873d4a79b2aad54d4370a3bc" ],
"workspace_id" : [ "ae559f076ac14061921b6c6c331576c4", "8f91082a19474825b2fee2147e9b464c", "1b59d3c777ad4d619b89eeac4f3cce87" ],
"created_by" : "username",
"updated_by" : "username",
"create_time" : "2024-01-03T09:11:42.872+00:00",
"update_time" : "2024-01-04T11:52:36.454+00:00",
"relation_type_name" : "PARENT_CHILD",
"ep1_id" : "0c0f000e-d7b2-4aab-956c-cdc8b07083c6",
"ep2_id" : "e10623fb-dbfc-4f43-bccc-33c68fb4c774",
"ep1_type_name" : "dws.Table",
"ep2_type_name" : "dws.Database",
"propagate_tag" : "NONE"
}, {
"guid" : "cfdd16e6-3827-4572-8b16-d200bb5fcc79",
"attributes" : {
"__index" : 1,
"__key" : null
},
"status" : "ACTIVE",
"direction" : "OUT",
"type_name" : "process.node_job",
"type_display_name" : "Job: node",
"project_id" : "0833a5737480d53b2f25c010dc1a7b88",
"instance_id" : [ "dd97167b873d4a79b2aad54d4370a3bc" ],
"workspace_id" : [ "1b59d3c777ad4d619b89eeac4f3cce87" ],
"created_by" : "username",
"updated_by" : "username",
"create_time" : "2024-01-03T10:17:24.696+00:00",
"update_time" : "2024-01-03T10:17:24.696+00:00",
"relation_type_name" : "PARENT_CHILD",
"ep1_id" : "71e0b8d8-abc8-4cf0-94ba-e8e0e04c9b5a",
"ep2_id" : "806e2242-a579-4340-aed0-7c8f35ec52fa",
"ep1_type_name" : "dlf.Job",
"ep2_type_name" : "dlf.dws_sql",
"propagate_tag" : "NONE"
}, {
"guid" : "8ab58411-db50-477f-b0e8-3faacefb3216",
"attributes" : {
"__index" : 0,
"__key" : null
},
"status" : "ACTIVE",
"direction" : "OUT",
"type_name" : "base.process_dataset_outputs",
"type_display_name" : "Output",
"project_id" : "0833a5737480d53b2f25c010dc1a7b88",
"instance_id" : [ "dd97167b873d4a79b2aad54d4370a3bc" ],
"workspace_id" : [ "1b59d3c777ad4d619b89eeac4f3cce87" ],
"created_by" : "username",
"updated_by" : "username",
"create_time" : "2024-01-03T10:17:34.823+00:00",
"update_time" : "2024-01-03T10:17:34.823+00:00",
"relation_type_name" : "DATA_FLOW",
"ep1_id" : "806e2242-a579-4340-aed0-7c8f35ec52fa",
"ep2_id" : "0c0f000e-d7b2-4aab-956c-cdc8b07083c6",
"ep1_type_name" : "dlf.dws_sql",
"ep2_type_name" : "dws.Table",
"propagate_tag" : "NONE"
} ],
"relationship_types" : null,
"entities" : [ {
"guid" : "71e0b8d8-abc8-4cf0-94ba-e8e0e04c9b5a",
"attributes" : {
"owner" : "username",
"path" : "",
"catalogId" : "catalog@cn-north-7",
"scheduleType" : "REAL_TIME",
"createTime" : "2024-01-03T10:17:17.924+00:00",
"qualifiedName" : "19424819@dlf_job.0833a5737480d53b2f25c010dc1a7b88-workspace-1b59d3c777ad4d619b89eeac4f3cce87",
"name" : "job_6757",
"description" : "BATCH",
"id" : 19424819,
"priority" : 0,
"cronExp" : "",
"baseType" : "Job"
},
"status" : "ACTIVE",
"version" : 5,
"type_name" : "dlf.Job",
"type_display_name" : "Jobs",
"project_id" : "0833a5737480d53b2f25c010dc1a7b88",
"domain_id" : "0833a5736980d53b0f22c0102ffcbfc0",
"instance_id" : [ "dd97167b873d4a79b2aad54d4370a3bc" ],
"workspace_id" : [ "1b59d3c777ad4d619b89eeac4f3cce87" ],
"created_by" : "username",
"updated_by" : "username",
"create_time" : "2024-01-03T10:12:07.391+00:00",
"update_time" : "2024-01-03T10:17:24.696+00:00",
"super_type_names" : [ "base.Process", "base.Asset", "process.Job" ],
"business_attributes" : {
"businessName" : {
"confidence" : 1,
"name" : "job_6757",
"confirmed" : true
}
},
"multi_attributes" : {
"tags" : [ ]
},
"extended_attributes" : { },
"display_text" : "job_6757"
}, {
"guid" : "0c0f000e-d7b2-4aab-956c-cdc8b07083c6",
"attributes" : {
"sourceId" : "dws@94a1ad37-1bde-4919-8e93-712577a9c3b2",
"description" : "",
"ddlCreateTime" : 1691478978133,
"dataConnectionId" : [ "3653cce08ed7433bad507a30d86f2f2c" ],
"totalFrequency" : 0,
"baseType" : "Table",
"tableType" : "BASE TABLE",
"partitionCount" : 0,
"path" : "/wk/public",
"hasRules" : false,
"catalogId" : "catalog@cn-north-7",
"writeFrequency" : 0,
"schemaQName" : "wk.public@dws.94a1ad37-1bde-4919-8e93-712577a9c3b2",
"isPartition" : false,
"tableSize" : 0,
"releaseStatus" : "",
"alias" : "",
"hasTriggers" : false,
"dataUpdateTime" : 0,
"publishStatus" : "",
"owner" : "dbadmin",
"orientation" : "ROW",
"lastAccessTime" : 0,
"qualifiedName" : "wk.public.wk_02@dws.94a1ad37-1bde-4919-8e93-712577a9c3b2",
"qualityScoreOverall" : 0,
"readFrequency" : 0,
"partitionType" : "",
"sourceType" : "dws",
"rowCounts" : 0,
"name" : "wk_02",
"databaseQName" : "wk@dws.94a1ad37-1bde-4919-8e93-712577a9c3b2",
"location" : "",
"comment" : "",
"partitionKeyCount" : 0,
"sourceName" : "dws_nossl_4autotest_nomodify",
"hasIndexes" : false,
"ddlUpdateTime" : 1691478978133
},
"status" : "ACTIVE",
"version" : 2,
"type_name" : "dws.Table",
"type_display_name" : "Data table",
"project_id" : "0833a5737480d53b2f25c010dc1a7b88",
"domain_id" : "0833a5736980d53b0f22c0102ffcbfc0",
"instance_id" : [ "dd97167b873d4a79b2aad54d4370a3bc" ],
"workspace_id" : [ "ae559f076ac14061921b6c6c331576c4", "1b59d3c777ad4d619b89eeac4f3cce87" ],
"created_by" : "username",
"updated_by" : "username",
"create_time" : "2024-01-03T09:11:42.871+00:00",
"update_time" : "2024-01-04T11:52:36.454+00:00",
"super_type_names" : [ "base.DataAsset", "dataasset.Table", "base.DataSet", "base.Asset" ],
"business_attributes" : {
"businessName" : {
"confidence" : 1,
"name" : "wk_02",
"confirmed" : true
}
},
"multi_attributes" : {
"classifications" : [ ],
"tags" : [ ]
},
"extended_attributes" : { },
"display_text" : "wk_02"
}, {
"guid" : "6a1510a9-f40c-477f-ae3a-638e592b6504",
"attributes" : {
"sourceId" : "dws@94a1ad37-1bde-4919-8e93-712577a9c3b2",
"owner" : "Ruby",
"path" : "/wk",
"catalogId" : "catalog@cn-north-7",
"sourceType" : "dws",
"qualifiedName" : "wk.public@dws.94a1ad37-1bde-4919-8e93-712577a9c3b2",
"name" : "public",
"databaseQName" : "wk@dws.94a1ad37-1bde-4919-8e93-712577a9c3b2",
"description" : "gs_roach_stop_backup",
"sourceName" : "dws_nossl_4autotest_nomodify",
"dataConnectionId" : [ "3653cce08ed7433bad507a30d86f2f2c" ],
"baseType" : "Schema"
},
"status" : "ACTIVE",
"version" : 3,
"type_name" : "dws.Schema",
"type_display_name" : "Mode",
"project_id" : "0833a5737480d53b2f25c010dc1a7b88",
"domain_id" : "0833a5736980d53b0f22c0102ffcbfc0",
"instance_id" : [ "dd97167b873d4a79b2aad54d4370a3bc" ],
"workspace_id" : [ "8f91082a19474825b2fee2147e9b464c", "ae559f076ac14061921b6c6c331576c4", "1b59d3c777ad4d619b89eeac4f3cce87" ],
"created_by" : "username",
"updated_by" : "username",
"create_time" : "2024-01-02T08:43:44.775+00:00",
"update_time" : "2024-01-04T11:52:26.054+00:00",
"super_type_names" : [ "base.DataAsset", "dataasset.Schema", "base.Asset" ],
"business_attributes" : {
"businessName" : {
"confidence" : 1,
"name" : "public",
"confirmed" : true
}
},
"multi_attributes" : {
"tags" : [ ]
},
"extended_attributes" : { },
"display_text" : "public"
}, {
"guid" : "e10623fb-dbfc-4f43-bccc-33c68fb4c774",
"attributes" : {
"sourceId" : "dws@94a1ad37-1bde-4919-8e93-712577a9c3b2",
"owner" : "dbadmin",
"qualifiedName" : "wk@dws.94a1ad37-1bde-4919-8e93-712577a9c3b2",
"description" : "",
"encoding" : "SQL_ASCII",
"dataConnectionId" : [ "3653cce08ed7433bad507a30d86f2f2c" ],
"baseType" : "Database",
"path" : "/",
"catalogId" : "catalog@cn-north-7",
"sourceType" : "dws",
"isTemplate" : false,
"name" : "wk",
"comment" : "",
"sourceName" : "dws_nossl_4autotest_nomodify"
},
"status" : "ACTIVE",
"version" : 3,
"type_name" : "dws.Database",
"type_display_name" : "Database",
"project_id" : "0833a5737480d53b2f25c010dc1a7b88",
"domain_id" : "0833a5736980d53b0f22c0102ffcbfc0",
"instance_id" : [ "dd97167b873d4a79b2aad54d4370a3bc" ],
"workspace_id" : [ "8f91082a19474825b2fee2147e9b464c", "ae559f076ac14061921b6c6c331576c4", "1b59d3c777ad4d619b89eeac4f3cce87" ],
"created_by" : "username",
"updated_by" : "username",
"create_time" : "2024-01-02T08:43:44.726+00:00",
"update_time" : "2024-01-04T11:52:25.995+00:00",
"super_type_names" : [ "base.DataAsset", "base.Asset", "dataasset.Database" ],
"business_attributes" : {
"businessName" : {
"confidence" : 1,
"name" : "wk",
"confirmed" : true
}
},
"multi_attributes" : {
"tags" : [ ]
},
"extended_attributes" : { },
"display_text" : "wk"
}, {
"guid" : "806e2242-a579-4340-aed0-7c8f35ec52fa",
"attributes" : {
"owner" : "username",
"scriptPath" : "8abfdb5a8cce4a43018cced3039200c2",
"statementOrScript" : "SCRIPT",
"qualifiedName" : "19424819.e2b86e34-3223-4332-ac24-c61f9af72e22@dlf_job.0833a5737480d53b2f25c010dc1a7b88-workspace -1b59d3c777ad4d619b89eeac4f3cce87",
"failRetry" : false,
"description" : "BATCH",
"pollingTime" : 20,
"nodeType" : "dws_sql_node",
"timeout" : 360,
"baseType" : "Node",
"args" : null,
"failPolicy" : "EXIT",
"path" : null,
"database" : "wk",
"catalogId" : "catalog@cn-north-7",
"maxRetryTime" : null,
"name" : "xxxx",
"statement" : "-- DWS sql -- ******************************************************************** ---- author: username-- create time: 2024/01/03 18:16:15 GMT+08:00-- ******************************************************************** --INSERT INTO wk_02 SELECT * FROM wk_01;",
"retryInterval" : null,
"connection" : "a0b248d34ab84631872f46d46a44f0b2",
"dirtyDataPath" : null
},
"status" : "ACTIVE",
"version" : 1,
"type_name" : "dlf.dws_sql",
"type_display_name" : "Node",
"project_id" : "0833a5737480d53b2f25c010dc1a7b88",
"domain_id" : "0833a5736980d53b0f22c0102ffcbfc0",
"instance_id" : [ "dd97167b873d4a79b2aad54d4370a3bc" ],
"workspace_id" : [ "1b59d3c777ad4d619b89eeac4f3cce87" ],
"created_by" : "username",
"updated_by" : "username",
"create_time" : "2024-01-03T10:17:24.696+00:00",
"update_time" : "2024-01-03T10:17:24.696+00:00",
"super_type_names" : [ "base.Process", "dlf.Node", "base.Asset", "process.Node" ],
"business_attributes" : {
"businessName" : {
"confidence" : 1,
"name" : "xxxx",
"confirmed" : true
}
},
"multi_attributes" : {
"tags" : [ ]
},
"extended_attributes" : { },
"display_text" : "xxxx"
} ],
"entity_types" : null
} SDK Sample Code
The SDK sample code is as follows.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | package com.huaweicloud.sdk.test; import com.huaweicloud.sdk.core.auth.ICredential; import com.huaweicloud.sdk.core.auth.BasicCredentials; import com.huaweicloud.sdk.core.exception.ConnectionException; import com.huaweicloud.sdk.core.exception.RequestTimeoutException; import com.huaweicloud.sdk.core.exception.ServiceResponseException; import com.huaweicloud.sdk.dataartsstudio.v1.region.DataArtsStudioRegion; import com.huaweicloud.sdk.dataartsstudio.v1.*; import com.huaweicloud.sdk.dataartsstudio.v1.model.*; public class ShowDatamapLineageSolution { public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment String ak = System.getenv("CLOUD_SDK_AK"); String sk = System.getenv("CLOUD_SDK_SK"); String projectId = "{project_id}"; ICredential auth = new BasicCredentials() .withProjectId(projectId) .withAk(ak) .withSk(sk); DataArtsStudioClient client = DataArtsStudioClient.newBuilder() .withCredential(auth) .withRegion(DataArtsStudioRegion.valueOf("<YOUR REGION>")) .build(); ShowDatamapLineageRequest request = new ShowDatamapLineageRequest(); request.withGuid("{guid}"); try { ShowDatamapLineageResponse response = client.showDatamapLineage(request); System.out.println(response.toString()); } catch (ConnectionException e) { e.printStackTrace(); } catch (RequestTimeoutException e) { e.printStackTrace(); } catch (ServiceResponseException e) { e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId()); System.out.println(e.getErrorCode()); System.out.println(e.getErrorMsg()); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # coding: utf-8 import os from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkdataartsstudio.v1.region.dataartsstudio_region import DataArtsStudioRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkdataartsstudio.v1 import * if __name__ == "__main__": # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak = os.environ["CLOUD_SDK_AK"] sk = os.environ["CLOUD_SDK_SK"] projectId = "{project_id}" credentials = BasicCredentials(ak, sk, projectId) client = DataArtsStudioClient.new_builder() \ .with_credentials(credentials) \ .with_region(DataArtsStudioRegion.value_of("<YOUR REGION>")) \ .build() try: request = ShowDatamapLineageRequest() request.guid = "{guid}" response = client.show_datamap_lineage(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dataartsstudio "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1/region" ) func main() { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak := os.Getenv("CLOUD_SDK_AK") sk := os.Getenv("CLOUD_SDK_SK") projectId := "{project_id}" auth := basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). WithProjectId(projectId). Build() client := dataartsstudio.NewDataArtsStudioClient( dataartsstudio.DataArtsStudioClientBuilder(). WithRegion(region.ValueOf("<YOUR REGION>")). WithCredential(auth). Build()) request := &model.ShowDatamapLineageRequest{} request.Guid = "{guid}" response, err := client.ShowDatamapLineage(request) if err == nil { fmt.Printf("%+v\n", response) } else { fmt.Println(err) } } |
For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.
Status Codes
| Status Code | Description |
|---|---|
| 200 | OK. |
| 400 | Bad request. |
| 401 | Unauthorized. |
| 403 | Forbidden. |
| 404 | Not found. |
| 500 | Internal server error. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot