UNPKG

open-lineage-client

Version:

TypeScript/JavaScript client for creating and sending OpenLineage standard events.

66 lines 2.06 kB
import { BaseFacet } from './BaseFacet.js'; /** * Represents the facets of a run. */ export class RunFacets { constructor(errorMessage = null, externalQuery = null, nominalTime = null, parent = null) { this.errorMessage = errorMessage; this.externalQuery = externalQuery; this.nominalTime = nominalTime; this.parent = parent; } } /** * Represents an error message facet. */ export class ErrorMessage extends BaseFacet { constructor(producer, schemaURL, message, programmingLanguage, stackTrace = null) { super(producer, schemaURL); this.message = message; this.programmingLanguage = programmingLanguage; this.stackTrace = stackTrace; } getSchema() { return 'https://openlineage.io/spec/facets/1-0-0/ErrorMessageRunFacet.json'; } } /** * Represents an external query facet. */ export class ExternalQuery extends BaseFacet { constructor(producer, schemaURL, externalQueryId, source) { super(producer, schemaURL); this.externalQueryId = externalQueryId; this.source = source; } getSchema() { return 'https://openlineage.io/spec/facets/1-0-0/ExternalQueryRunFacet.json'; } } /** * Represents a nominal time facet. */ export class NominalTime extends BaseFacet { constructor(producer, schemaURL, nominalStartTime, nominalEndTime) { super(producer, schemaURL); this.nominalStartTime = nominalStartTime; this.nominalEndTime = nominalEndTime; } getSchema() { return 'https://openlineage.io/spec/facets/1-0-0/NominalTimeRunFacet.json'; } } /** * Represents a parent facet. */ export class Parent extends BaseFacet { constructor(producer, schemaURL, jobName, jobNamespace, runId) { super(producer, schemaURL); this.job = { name: jobName, namespace: jobNamespace }; this.run = { runId: runId }; } getSchema() { return 'https://openlineage.io/spec/facets/1-0-0/ParentRunFacet.json'; } } //# sourceMappingURL=RunFacets.js.map