Class PostgresOpenLineageEventDigest
java.lang.Object
org.odpi.openmetadata.adapters.connectors.integration.openlineage.postgres.PostgresOpenLineageEventDigest
PostgresOpenLineageEventDigest extracts the rows that an OpenLineage run event contributes to the digest tables
of a PostgreSQL OpenLineage log store (see
PostgresOpenLineageLogStoreSchema). It holds no database
code, so the extraction can be tested on its own.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA data quality assertion reported on an input dataset.static final recordA dataset read (I) or written (O) by the run.static final recordContribution of the event to its run.static final recordA test reported in the run's test facet. -
Method Summary
Modifier and TypeMethodDescriptiondigest(OpenLineageRunEvent event) Return the digest of an event, or null if the event can not be stored because it has no job name, run identifier or readable event time.digest(OpenLineageRunEvent event, List<String> runRetryFacetNames, List<String> parametricSweepFacetNames) Return the digest of an event, or null if the event can not be stored because it has no job name, run identifier or readable event time.Return the data quality assertions.Return the datasets read and written.Return the design point of the parametric sweep that the run evaluates, if the event has a parametric sweep facet that gives it.Return the time of the event.Return the event type (empty if the event had none).Return the egeria governance action run facet, if the event has one.Return the job name.Return the job namespace (empty if the event had none).Return the identifier of the run that this run retries, if the event has a run retry facet.Return the producer of the event.Return the number of this attempt, if the event has a run retry facet that gives it.getRun()Return the contribution of the event to its run.getRunId()Return the run identifier.Return the name of the parametric sweep that the run belongs to, if the event has a parametric sweep facet.getTests()Return the tests.static DateparseTimestamp(String timestamp) Parse an ISO-8601 timestamp from an OpenLineage event.
-
Method Details
-
digest
Return the digest of an event, or null if the event can not be stored because it has no job name, run identifier or readable event time.- Parameters:
event- event formatted using the Egeria beans- Returns:
- digest or null
-
digest
public static PostgresOpenLineageEventDigest digest(OpenLineageRunEvent event, List<String> runRetryFacetNames, List<String> parametricSweepFacetNames) Return the digest of an event, or null if the event can not be stored because it has no job name, run identifier or readable event time.- Parameters:
event- event formatted using the Egeria beansrunRetryFacetNames- other facet names that carry the content of the egeria_runRetry facet (may be null)parametricSweepFacetNames- other facet names that carry the content of the egeria_parametricSweep facet (may be null)- Returns:
- digest or null
-
parseTimestamp
Parse an ISO-8601 timestamp from an OpenLineage event. Timestamps without a zone are treated as UTC.- Parameters:
timestamp- string timestamp- Returns:
- date or null if the timestamp is missing or unparsable
-
getEventTime
Return the time of the event.- Returns:
- date
-
getEventType
Return the event type (empty if the event had none).- Returns:
- START, RUNNING, COMPLETE, FAIL, ABORT, OTHER or empty
-
getRunId
Return the run identifier.- Returns:
- string
-
getJobNamespace
Return the job namespace (empty if the event had none).- Returns:
- string
-
getJobName
Return the job name.- Returns:
- string
-
getProducer
Return the producer of the event.- Returns:
- URI as a string, or null
-
getGovernanceAction
Return the egeria governance action run facet, if the event has one.- Returns:
- facet or null
-
getPriorRunId
Return the identifier of the run that this run retries, if the event has a run retry facet.- Returns:
- run identifier or null
-
getRetryAttempt
Return the number of this attempt, if the event has a run retry facet that gives it.- Returns:
- attempt or null
-
getSweepName
Return the name of the parametric sweep that the run belongs to, if the event has a parametric sweep facet.- Returns:
- name or null
-
getDesignPoint
Return the design point of the parametric sweep that the run evaluates, if the event has a parametric sweep facet that gives it.- Returns:
- design point or null
-
getRun
Return the contribution of the event to its run.- Returns:
- run row
-
getDatasets
Return the datasets read and written.- Returns:
- list
-
getAssertions
Return the data quality assertions.- Returns:
- list
-
getTests
Return the tests.- Returns:
- list
-