Skip to main content

external_lineage

Creates, updates, deletes, gets or lists an external_lineage resource.

Overview

Nameexternal_lineage
TypeResource
Iddatabricks_workspace.catalog.external_lineage

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
external_lineage_infoobjectInformation about the edge metadata of the external lineage relationship.
external_metadata_infoobjectInformation about external metadata involved in the lineage relationship.
file_infoobjectInformation about the file involved in the lineage relationship.
model_infoobjectInformation about the model version involved in the lineage relationship.
table_infoobjectInformation about the table involved in the lineage relationship.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectobject_info, lineage_direction, deployment_namepage_size, page_tokenLists external lineage relationships of a Databricks object or external metadata given a supplied
createinsertdeployment_name, external_lineage_relationshipCreates an external lineage relationship between a Databricks or external metadata object and another
updateupdateupdate_mask, deployment_name, external_lineage_relationshipUpdates an external lineage relationship between a Databricks or external metadata object and another
deletedeleteexternal_lineage_relationship, deployment_nameDeletes an external lineage relationship between a Databricks or external metadata object and another

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
external_lineage_relationshipobject:class:DeleteRequestExternalLineage
lineage_directionstringThe lineage direction to filter on.
object_infoobjectThe object to query external lineage relationships for. Since this field is a query parameter, please flatten the nested fields. For example, if the object is a table, the query parameter should look like: object_info.table.name=main.sales.customers
update_maskstring
page_sizeintegerSpecifies the maximum number of external lineage relationships to return in a single response. The value must be less than or equal to 1000.
page_tokenstringOpaque pagination token to go to next page based on previous query.

SELECT examples

Lists external lineage relationships of a Databricks object or external metadata given a supplied

SELECT
external_lineage_info,
external_metadata_info,
file_info,
model_info,
table_info
FROM databricks_workspace.catalog.external_lineage
WHERE object_info = '{{ object_info }}' -- required
AND lineage_direction = '{{ lineage_direction }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;

INSERT examples

Creates an external lineage relationship between a Databricks or external metadata object and another

INSERT INTO databricks_workspace.catalog.external_lineage (
external_lineage_relationship,
deployment_name
)
SELECT
'{{ external_lineage_relationship }}' /* required */,
'{{ deployment_name }}'
RETURNING
id,
columns,
properties,
source,
target
;

UPDATE examples

Updates an external lineage relationship between a Databricks or external metadata object and another

UPDATE databricks_workspace.catalog.external_lineage
SET
external_lineage_relationship = '{{ external_lineage_relationship }}'
WHERE
update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND external_lineage_relationship = '{{ external_lineage_relationship }}' --required
RETURNING
id,
columns,
properties,
source,
target;

DELETE examples

Deletes an external lineage relationship between a Databricks or external metadata object and another

DELETE FROM databricks_workspace.catalog.external_lineage
WHERE external_lineage_relationship = '{{ external_lineage_relationship }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;