Skip to main content

lineage_events

Creates, updates, deletes, gets or lists a lineage_events resource.

Overview

Namelineage_events
TypeResource
Idgoogle.datalineage.lineage_events

Fields

NameDatatypeDescription
namestringImmutable. The resource name of the lineage event. Format: projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}. Can be specified or auto-assigned. {lineageevent} must be not longer than 200 characters and only contain characters in a set: `a-zA-Z0-9-:.`
endTimestringOptional. The end of the transformation which resulted in this lineage event. For streaming scenarios, it should be the end of the period from which the lineage is being reported.
linksarrayOptional. List of source-target pairs. Can't contain more than 100 tuples.
startTimestringRequired. The beginning of the transformation which resulted in this lineage event. For streaming scenarios, it should be the beginning of the period from which the lineage is being reported.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlineageEventsId, locationsId, processesId, projectsId, runsIdGets details of a specified lineage event.
listSELECTlocationsId, processesId, projectsId, runsIdLists lineage events in the given project and location. The list order is not defined.
createINSERTlocationsId, processesId, projectsId, runsIdCreates a new lineage event.
deleteDELETElineageEventsId, locationsId, processesId, projectsId, runsIdDeletes the lineage event with the specified name.

SELECT examples

Lists lineage events in the given project and location. The list order is not defined.

SELECT
name,
endTime,
links,
startTime
FROM google.datalineage.lineage_events
WHERE locationsId = '{{ locationsId }}'
AND processesId = '{{ processesId }}'
AND projectsId = '{{ projectsId }}'
AND runsId = '{{ runsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new lineage_events resource.

/*+ create */
INSERT INTO google.datalineage.lineage_events (
locationsId,
processesId,
projectsId,
runsId,
startTime,
name,
endTime,
links
)
SELECT
'{{ locationsId }}',
'{{ processesId }}',
'{{ projectsId }}',
'{{ runsId }}',
'{{ startTime }}',
'{{ name }}',
'{{ endTime }}',
'{{ links }}'
;

DELETE example

Deletes the specified lineage_events resource.

/*+ delete */
DELETE FROM google.datalineage.lineage_events
WHERE lineageEventsId = '{{ lineageEventsId }}'
AND locationsId = '{{ locationsId }}'
AND processesId = '{{ processesId }}'
AND projectsId = '{{ projectsId }}'
AND runsId = '{{ runsId }}';