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

The following fields are returned by SELECT queries:

Successful response

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. {lineage_event} must be not longer than 200 characters and only contain characters in a set: a-zA-Z0-9_-:.
endTimestring (google-datetime)Optional. 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.
startTimestring (google-datetime)Required. 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

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, processesId, runsId, lineageEventsIdGets details of a specified lineage event.
listselectprojectsId, locationsId, processesId, runsIdpageSize, pageTokenLists lineage events in the given project and location. The list order is not defined.
createinsertprojectsId, locationsId, processesId, runsIdrequestIdCreates a new lineage event.
deletedeleteprojectsId, locationsId, processesId, runsId, lineageEventsIdallowMissingDeletes the lineage event with the specified name.

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
lineageEventsIdstring
locationsIdstring
processesIdstring
projectsIdstring
runsIdstring
allowMissingboolean
pageSizeinteger (int32)
pageTokenstring
requestIdstring

SELECT examples

Gets details of a specified lineage event.

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

INSERT examples

Creates a new lineage event.

INSERT INTO google.datalineage.lineage_events (
data__name,
data__links,
data__startTime,
data__endTime,
projectsId,
locationsId,
processesId,
runsId,
requestId
)
SELECT
'{{ name }}',
'{{ links }}',
'{{ startTime }}',
'{{ endTime }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ processesId }}',
'{{ runsId }}',
'{{ requestId }}'
RETURNING
name,
endTime,
links,
startTime
;

DELETE examples

Deletes the lineage event with the specified name.

DELETE FROM google.datalineage.lineage_events
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND processesId = '{{ processesId }}' --required
AND runsId = '{{ runsId }}' --required
AND lineageEventsId = '{{ lineageEventsId }}' --required
AND allowMissing = '{{ allowMissing }}';