java.lang.Object
org.odpi.openmetadata.adapters.connectors.integration.openlineage.postgres.PostgresOpenLineageEventDigest

public class PostgresOpenLineageEventDigest extends Object
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.
  • 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 beans
      runRetryFacetNames - 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

      public static Date parseTimestamp(String timestamp)
      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

      public Date getEventTime()
      Return the time of the event.
      Returns:
      date
    • getEventType

      public String getEventType()
      Return the event type (empty if the event had none).
      Returns:
      START, RUNNING, COMPLETE, FAIL, ABORT, OTHER or empty
    • getRunId

      public String getRunId()
      Return the run identifier.
      Returns:
      string
    • getJobNamespace

      public String getJobNamespace()
      Return the job namespace (empty if the event had none).
      Returns:
      string
    • getJobName

      public String getJobName()
      Return the job name.
      Returns:
      string
    • getProducer

      public String getProducer()
      Return the producer of the event.
      Returns:
      URI as a string, or null
    • getGovernanceAction

      public OpenLineageEgeriaGovernanceActionRunFacet getGovernanceAction()
      Return the egeria governance action run facet, if the event has one.
      Returns:
      facet or null
    • getPriorRunId

      public String 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

      public Integer getRetryAttempt()
      Return the number of this attempt, if the event has a run retry facet that gives it.
      Returns:
      attempt or null
    • getSweepName

      public String 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

      public String 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