diff --git a/.changes/unreleased/Features-20250610-11688.yaml b/.changes/unreleased/Features-20250610-11688.yaml new file mode 100644 index 00000000000..54ecff4a132 --- /dev/null +++ b/.changes/unreleased/Features-20250610-11688.yaml @@ -0,0 +1,5 @@ +kind: Features +body: Add Openlineage to dbt-core +time: 2025-06-10T11:30:00+02:00 +custom: + Author: MassyB diff --git a/core/dbt/cli/options.py b/core/dbt/cli/options.py index c73a4bcd374..f07a00f05a5 100644 --- a/core/dbt/cli/options.py +++ b/core/dbt/cli/options.py @@ -33,8 +33,9 @@ def __init__(self, *args, **kwargs) -> None: else: assert isinstance(option_type, ChoiceTuple), msg - def add_to_parser(self, parser: OptionParser, ctx: Context): - def parser_process(value: str, state: ParsingState): + @t.no_type_check + def add_to_parser(self, parser: OptionParser, ctx: Context): # type: ignore[valid-type] + def parser_process(value: str, state: ParsingState): # type: ignore[valid-type] # method to hook to the parser.process done = False value_list = str.split(value, " ") diff --git a/core/dbt/cli/requires.py b/core/dbt/cli/requires.py index dc2b3796a07..8e6ef672bb2 100644 --- a/core/dbt/cli/requires.py +++ b/core/dbt/cli/requires.py @@ -31,6 +31,8 @@ from dbt.exceptions import DbtProjectError, FailFastError from dbt.flags import get_flag_dict, get_flags, set_flags from dbt.mp_context import get_mp_context +from dbt.openlineage.common.utils import is_runnable_dbt_command +from dbt.openlineage.handler import OpenLineageHandler from dbt.parser.manifest import parse_manifest from dbt.plugins import set_up_plugin_manager from dbt.profiler import profiler @@ -82,8 +84,13 @@ def wrapper(*args, **kwargs): # Reset invocation_id for each 'invocation' of a dbt command (can happen multiple times in a single process) reset_invocation_id() - # Logging + # OpenLineage + ol_handler = OpenLineageHandler(ctx) callbacks = ctx.obj.get("callbacks", []) + if is_runnable_dbt_command(flags): + callbacks.append(ol_handler.handle) + + # Logging setup_event_logger(flags=flags, callbacks=callbacks) # Tracking diff --git a/core/dbt/events/__init__.py b/core/dbt/events/__init__.py index 123f242cae5..ae774360125 100644 --- a/core/dbt/events/__init__.py +++ b/core/dbt/events/__init__.py @@ -1,8 +1,11 @@ from typing import Any, Dict, Set +import dbt.adapters.events.adapter_types_pb2 as adapter_types_pb2 import dbt.adapters.events.types as adapter_dbt_event_types +import dbt.events.core_types_pb2 as core_dbt_event_types_pb2 import dbt.events.types as core_dbt_event_types import dbt_common.events.types as dbt_event_types +import dbt_common.events.types_pb2 as dbt_event_types_pb2 ALL_EVENT_TYPES: Dict[str, Any] = { **dbt_event_types.__dict__, @@ -13,3 +16,10 @@ ALL_EVENT_NAMES: Set[str] = set( [name for name, cls in ALL_EVENT_TYPES.items() if isinstance(cls, type)] ) + + +ALL_PROTO_TYPES: Dict[str, Any] = { + **dbt_event_types_pb2.__dict__, + **core_dbt_event_types_pb2.__dict__, + **adapter_types_pb2.__dict__, +} diff --git a/core/dbt/events/types.py b/core/dbt/events/types.py index 0228a4c9dc5..e631f873851 100644 --- a/core/dbt/events/types.py +++ b/core/dbt/events/types.py @@ -2425,3 +2425,14 @@ def code(self) -> str: def message(self) -> str: return f"Artifacts skipped for command : {self.msg}" + + +class OpenLineageException(WarnLevel): + def code(self) -> str: + return "Z064" + + def message(self): + return ( + f"Encountered an error while creating OpenLineageEvent: {self.exc}\n" + f"{self.exc_info}" + ) diff --git a/core/dbt/openlineage/__init__.py b/core/dbt/openlineage/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/core/dbt/openlineage/common/__init__.py b/core/dbt/openlineage/common/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/core/dbt/openlineage/common/dataset_facets.py b/core/dbt/openlineage/common/dataset_facets.py new file mode 100644 index 00000000000..bec5c96178b --- /dev/null +++ b/core/dbt/openlineage/common/dataset_facets.py @@ -0,0 +1,196 @@ +import enum +from typing import List, Optional, Union, no_type_check + +from openlineage.client.event_v2 import Dataset +from openlineage.client.facet_v2 import ( + datasource_dataset, + documentation_dataset, + schema_dataset, +) + +from dbt.adapters.contracts.connection import Credentials +from dbt.artifacts.resources.types import NodeType +from dbt.contracts.graph.manifest import Manifest +from dbt.contracts.graph.nodes import ( + GenericTestNode, + ManifestNode, + SeedNode, + SourceDefinition, +) + + +class Adapter(enum.Enum): + # supported adapters + BIGQUERY = "bigquery" + SNOWFLAKE = "snowflake" + REDSHIFT = "redshift" + SPARK = "spark" + POSTGRES = "postgres" + DATABRICKS = "databricks" + SQLSERVER = "sqlserver" + DREMIO = "dremio" + ATHENA = "athena" + DUCKDB = "duckdb" + TRINO = "trino" + + @staticmethod + def adapters() -> str: + # String representation of all supported adapter names + return ",".join([f"`{x.value}`" for x in list(Adapter)]) + + +class SparkConnectionMethod(enum.Enum): + THRIFT = "thrift" + ODBC = "odbc" + HTTP = "http" + + @staticmethod + def methods(): + return [x.value for x in SparkConnectionMethod] + + +def extract_schema_dataset_facet( + node: Union[ManifestNode, SourceDefinition], +) -> List[schema_dataset.SchemaDatasetFacetFields]: + if node.resource_type == NodeType.Seed: + return _extract_schema_dataset_from_seed(node) + else: + return _extract_schema_dataset_facet_from_manifest_sql_node(node) + + +def _extract_schema_dataset_facet_from_manifest_sql_node( + manifest_sql_node: Union[ManifestNode, SourceDefinition], +) -> List[schema_dataset.SchemaDatasetFacetFields]: + schema_fields = [] + for column_info in manifest_sql_node.columns.values(): + description = column_info.description + name = column_info.name + data_type = column_info.data_type or "" + schema_fields.append( + schema_dataset.SchemaDatasetFacetFields( + name=name, description=description, type=data_type + ) + ) + return schema_fields + + +def _extract_schema_dataset_from_seed( + seed: SeedNode, +) -> List[schema_dataset.SchemaDatasetFacetFields]: + schema_fields = [] + for col_name in seed.config.column_types: + col_type = seed.config.column_types[col_name] + schema_fields.append(schema_dataset.SchemaDatasetFacetFields(name=col_name, type=col_type)) + return schema_fields + + +def get_model_inputs( + node_unique_id: str, manifest: Manifest +) -> List[ManifestNode | SourceDefinition]: + upstreams: List[ManifestNode | SourceDefinition] = [] + input_node_ids = manifest.parent_map.get(node_unique_id, []) + for input_node_id in input_node_ids: + if input_node_id.startswith("source."): + upstreams.append(manifest.sources[input_node_id]) + else: + upstreams.append(manifest.nodes[input_node_id]) + return upstreams + + +def node_to_dataset( + node: Union[ManifestNode, SourceDefinition], dataset_namespace: str +) -> Dataset: + facets = { + "dataSource": datasource_dataset.DatasourceDatasetFacet( + name=dataset_namespace, uri=dataset_namespace + ), + "schema": schema_dataset.SchemaDatasetFacet(fields=extract_schema_dataset_facet(node)), + "documentation": documentation_dataset.DocumentationDatasetFacet( + description=node.description + ), + } + node_fqn = ".".join(node.fqn) + return Dataset(namespace=dataset_namespace, name=node_fqn, facets=facets) + + +def get_test_column(test_node: GenericTestNode) -> Optional[str]: + return test_node.test_metadata.kwargs.get("column_name") + + +@no_type_check +def extract_namespace(adapter: Credentials) -> str: + # Extract namespace from profile's type + if adapter.type == Adapter.SNOWFLAKE.value: + return f"snowflake://{_fix_account_name(adapter.account)}" + elif adapter.type == Adapter.BIGQUERY.value: + return "bigquery" + elif adapter.type == Adapter.REDSHIFT.value: + return f"redshift://{adapter.host}:{adapter.port}" + elif adapter.type == Adapter.POSTGRES.value: + return f"postgres://{adapter.host}:{adapter.port}" + elif adapter.type == Adapter.TRINO.value: + return f"trino://{adapter.host}:{adapter.port}" + elif adapter.type == Adapter.DATABRICKS.value: + return f"databricks://{adapter.host}" + elif adapter.type == Adapter.SQLSERVER.value: + return f"mssql://{adapter.server}:{adapter.port}" + elif adapter.type == Adapter.DREMIO.value: + return f"dremio://{adapter.software_host}:{adapter.port}" + elif adapter.type == Adapter.ATHENA.value: + return f"awsathena://athena.{adapter.region_name}.amazonaws.com" + elif adapter.type == Adapter.DUCKDB.value: + return f"duckdb://{adapter.path}" + elif adapter.type == Adapter.SPARK.value: + port = "" + if hasattr(adapter, "port"): + port = f":{adapter.port}" + elif adapter.method in [ + SparkConnectionMethod.HTTP.value, + SparkConnectionMethod.ODBC.value, + ]: + port = "443" + elif adapter.method == SparkConnectionMethod.THRIFT.value: + port = "10001" + + if adapter.method in SparkConnectionMethod.methods(): + return f"spark://{adapter.host}{port}" + else: + raise NotImplementedError( + f"Connection method `{adapter.method}` is not " f"supported for spark adapter." + ) + else: + raise NotImplementedError( + f"Only {Adapter.adapters()} adapters are supported right now. " + f"Passed {adapter.type}" + ) + + +def _fix_account_name(name: str) -> str: + if not any(word in name for word in ["-", "_"]): + # If there is neither '-' nor '_' in the name, we append `.us-west-1.aws` + return f"{name}.us-west-1.aws" + + if "." in name: + # Logic for account locator with dots remains unchanged + spl = name.split(".") + if len(spl) == 1: + account = spl[0] + region, cloud = "us-west-1", "aws" + elif len(spl) == 2: + account, region = spl + cloud = "aws" + else: + account, region, cloud = spl + return f"{account}.{region}.{cloud}" + + # Check for existing accounts with cloud names + if cloud := next((c for c in ["aws", "gcp", "azure"] if c in name), ""): + parts = name.split(cloud) + account = parts[0].strip("-_.") + + if not (region := parts[1].strip("-_.").replace("_", "-")): + return name + return f"{account}.{region}.{cloud}" + + # Default case, return the original name + return name diff --git a/core/dbt/openlineage/common/facets.py b/core/dbt/openlineage/common/facets.py new file mode 100644 index 00000000000..90deccbdf2b --- /dev/null +++ b/core/dbt/openlineage/common/facets.py @@ -0,0 +1,168 @@ +import enum +import os +from typing import Dict, Optional + +import attr +from click import Context +from openlineage.client.facet_v2 import ( + BaseFacet, + error_message_run, + job_type_job, + parent_run, + sql_job, +) + +from dbt.adapters.events.types import SQLQuery +from dbt.artifacts.resources.types import NodeType +from dbt.events.types import CommandCompleted, FoundStats +from dbt.openlineage.common.utils import ( + get_attribute, + get_openlineage_producer, + sanitize_job_name_component, +) +from dbt_common.events.base_types import EventMsg + +GITHUB_LOCATION = ( + "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/" +) +OPENLINEAGE_DBT_JOB_NAME_ENV_VAR = "OPENLINEAGE_DBT_JOB_NAME" +OPENLINEAGE_NAMESPACE_ENV_VAR = "OPENLINEAGE_NAMESPACE" +OPENLINEAGE_PARENT_ID_ENV_VAR = "OPENLINEAGE_PARENT_ID" + + +@attr.s +class DbtVersionRunFacet(BaseFacet): + version: str = attr.ib() + + @staticmethod + def _get_schema() -> str: + return GITHUB_LOCATION + "dbt-version-run-facet.json" + + +@attr.s +class ParentRunMetadata: + run_id: str = attr.ib() + job_name: str = attr.ib() + job_namespace: str = attr.ib() + + def to_openlineage(self) -> parent_run.ParentRunFacet: + return parent_run.ParentRunFacet( + run=parent_run.Run(runId=self.run_id), + job=parent_run.Job(namespace=self.job_namespace, name=self.job_name), + ) + + +class DbtOpenlineageJobType(enum.Enum): + job = "JOB" + model = "MODEL" + seed = "SEED" + snapshot = "SNAPSHOT" + test = "TEST" + sql = "SQL" + + +def get_parent_run_facet() -> Dict: + # The parent job that started the dbt command. Usually the scheduler (Airflow, ...etc) + parent_id = os.getenv(OPENLINEAGE_PARENT_ID_ENV_VAR) + parent_run_facet = {} + if parent_id: + parent_namespace, parent_job_name, parent_run_id = parent_id.split("/") + parent_run_facet["parent"] = ParentRunMetadata( + run_id=parent_run_id, + job_name=parent_job_name, + job_namespace=parent_namespace, + ).to_openlineage() + return parent_run_facet + + +def get_dbt_command_parent_run_facet(parent_run_metadata: ParentRunMetadata) -> Dict: + return {"parent": parent_run_metadata.to_openlineage()} + + +def get_sql_job_facet(e: SQLQuery) -> Dict: + return {"sql": sql_job.SQLJobFacet(query=e.data.sql)} + + +def get_error_message_run_facet(error_message: str, stacktrace=None) -> Dict: + return { + "errorMessage": error_message_run.ErrorMessageRunFacet( + message=error_message, programmingLanguage="sql", stackTrace=stacktrace + ) + } + + +def get_dbt_version_facet() -> Dict: + from dbt.version import __version__ as dbt_version + + return {"dbt_version": DbtVersionRunFacet(version=dbt_version)} + + +def get_job_type_facet(e: EventMsg) -> Dict: + job_type = _get_job_type(e) + return { + "jobType": job_type_job.JobTypeJobFacet( + jobType=job_type, + integration="DBT", + processingType="BATCH", + producer=get_openlineage_producer(), + ) + } + + +def _get_job_type(e: EventMsg) -> Optional[str]: + node_resource_type = get_attribute(e, "data.node_info.resource_type") + event_name = get_attribute(e, "info.name") + if event_name == SQLQuery.__name__: + return DbtOpenlineageJobType.sql.value + elif event_name in (CommandCompleted.__name__, FoundStats.__name__): + return DbtOpenlineageJobType.job.value + elif node_resource_type == NodeType.Model: + return DbtOpenlineageJobType.model.value + elif node_resource_type == NodeType.Snapshot: + return DbtOpenlineageJobType.snapshot.value + elif node_resource_type == NodeType.Seed: + return DbtOpenlineageJobType.seed.value + elif node_resource_type == NodeType.Test: + return DbtOpenlineageJobType.test.value + return None + + +def get_job_name(e: EventMsg, ctx: Context) -> str: + """ + Openlineage job_name is computed, in the following order: + 1. using an environment variable + 2. using the selectors + 3. using a default value + """ + if e.info.name in (CommandCompleted.__name__, FoundStats.__name__): + project_name = ctx.obj["project"].project_name + dbt_flags = ctx.obj["flags"] + profile = ctx.obj["profile"] + default_job_name = f"dbt-run--project={project_name}--profile={profile.profile_name}" + + dbt_job_name_env = os.environ.get(OPENLINEAGE_DBT_JOB_NAME_ENV_VAR) + + selector = dbt_flags.selector + select = dbt_flags.select + exclude = dbt_flags.exclude + + if dbt_job_name_env: + return dbt_job_name_env + elif select or exclude: + selected_models = "-".join(sanitize_job_name_component(model) for model in select) + job_name = f"{default_job_name}--select={selected_models}" + if exclude: + excluded_models = "-".join(sanitize_job_name_component(model) for model in exclude) + job_name = f"{job_name}--exclude={excluded_models}" + return job_name + elif selector: + job_name = f"{default_job_name}--selector={sanitize_job_name_component(selector)}" + return job_name + else: + return default_job_name + else: + return get_attribute(e, "data.node_info.unique_id") or "dbt-run" + + +def get_job_namespace() -> str: + return os.environ.get(OPENLINEAGE_NAMESPACE_ENV_VAR, "dbt") diff --git a/core/dbt/openlineage/common/utils.py b/core/dbt/openlineage/common/utils.py new file mode 100644 index 00000000000..23d2540e5f1 --- /dev/null +++ b/core/dbt/openlineage/common/utils.py @@ -0,0 +1,91 @@ +import datetime +import re +from typing import Any, Dict, List, Optional + +from openlineage.client.event_v2 import ( + InputDataset, + Job, + OutputDataset, + Run, + RunEvent, + RunState, +) + +from dbt.cli.flags import Flags +from dbt.cli.types import Command +from dbt_common.events.base_types import EventMsg + + +def get_attribute(e: EventMsg, attribute: str, default: Any = None) -> Any: + attributes = attribute.split(".") + current = e + for attr in attributes: + if hasattr(current, attr): + current = getattr(current, attr) + else: + return default + return current + + +def get_event_time(seconds: int) -> str: + return datetime.datetime.fromtimestamp(seconds).isoformat() + + +def generate_run_event( + event_type: RunState, + event_time: str, + run_id: str, + job_name: str, + job_namespace: str, + inputs: Optional[List[InputDataset]] = None, + outputs: Optional[List[OutputDataset]] = None, + job_facets: Optional[Dict] = None, + run_facets: Optional[Dict] = None, +) -> RunEvent: + inputs = inputs or [] + outputs = outputs or [] + job_facets = job_facets or {} + run_facets = run_facets or {} + return RunEvent( + eventType=event_type, + eventTime=event_time, + run=Run(runId=run_id, facets=run_facets), + job=Job( + namespace=job_namespace, + name=job_name, + facets=job_facets, + ), + inputs=inputs, + outputs=outputs, + producer=get_openlineage_producer(), + ) + + +def get_openlineage_producer() -> str: + version = _get_openlineage_version() + return f"https://github.com/OpenLineage/OpenLineage/tree/{version}/integration/dbt" + + +def _get_openlineage_version() -> str: + from importlib.metadata import version + + return version("openlineage-python") + + +def is_runnable_dbt_command(flags: Flags) -> bool: + runnable_commands = { + Command.RUN.value, + Command.BUILD.value, + Command.TEST.value, + Command.SNAPSHOT.value, + Command.SEED.value, + } + return flags.which in runnable_commands + + +def sanitize_job_name_component(s: str) -> str: + """ + A utility function that sanitizes the job name component by replacing + any non-alphanumeric characters with underscores. + """ + return re.sub(r"[^a-zA-Z0-9_\-]", "__", s) diff --git a/core/dbt/openlineage/handler.py b/core/dbt/openlineage/handler.py new file mode 100644 index 00000000000..e1dee136e74 --- /dev/null +++ b/core/dbt/openlineage/handler.py @@ -0,0 +1,410 @@ +import traceback +from collections import defaultdict +from typing import Dict, List, Optional, Union + +from click import Context +from openlineage.client.client import OpenLineageClient +from openlineage.client.event_v2 import InputDataset, OutputDataset, RunEvent, RunState +from openlineage.client.facet_v2 import data_quality_assertions_dataset +from openlineage.client.uuid import generate_new_uuid + +from dbt.adapters.contracts.connection import Credentials +from dbt.adapters.events.types import SQLQuery, SQLQueryStatus +from dbt.artifacts.resources.types import NodeType +from dbt.artifacts.schemas.results import NodeStatus +from dbt.cli.flags import Flags +from dbt.contracts.graph.manifest import Manifest +from dbt.contracts.graph.nodes import GenericTestNode +from dbt.events.types import ( + CatchableExceptionOnRun, + CommandCompleted, + FoundStats, + NodeFinished, + NodeStart, + OpenLineageException, +) +from dbt.openlineage.common.dataset_facets import ( + extract_namespace, + get_model_inputs, + get_test_column, + node_to_dataset, +) +from dbt.openlineage.common.facets import ( + ParentRunMetadata, + get_dbt_command_parent_run_facet, + get_dbt_version_facet, + get_error_message_run_facet, + get_job_name, + get_job_namespace, + get_job_type_facet, + get_parent_run_facet, + get_sql_job_facet, +) +from dbt.openlineage.common.utils import ( + generate_run_event, + get_attribute, + get_event_time, +) +from dbt_common.events.base_types import EventMsg +from dbt_common.events.functions import fire_event + + +class OpenLineageHandler: + + def __init__(self, ctx: Context): + self.dbt_command_metadata: ParentRunMetadata + + self.client = OpenLineageClient() + self.ctx = ctx + self.node_id_to_ol_run_id: Dict[str, str] = defaultdict(lambda: str(generate_new_uuid())) + + # sql query ids are incremented sequentially per node_id + self.node_id_to_sql_query_id: Dict[str, int] = defaultdict(lambda: 1) + self.node_id_to_sql_start_event: Dict[str, RunEvent] = {} + self.node_id_to_node_start_event: Dict[str, RunEvent] = {} + + @property + def _flags(self) -> Flags: + return self.ctx.obj["flags"] + + @property + def _adapter_credentials(self) -> Credentials: + return self.ctx.obj["runtime_config"].credentials + + @property + def _manifest(self) -> Manifest: + return self.ctx.obj["manifest"] + + def handle(self, e: EventMsg): + """ + Callback passed to the eventManager. + All exceptions are handled in this function. This callback never makes dbt fail. + """ + if e.info.name == OpenLineageException.__name__: + return + try: + self.handle_unsafe(e) + except Exception as exception: + self._handle_exception(exception) + + def _handle_exception(self, e: Exception): + fire_event(OpenLineageException(exc=str(e), exc_info=traceback.format_exc())) + + def handle_unsafe(self, e: EventMsg): + event_name = e.info.name + openlineage_event = None + + if event_name == FoundStats.__name__: + openlineage_event = self._parse_dbt_start_command_event(e, self.ctx) # type: ignore[arg-type] + self._setup_dbt_command_metadata(openlineage_event, self.ctx) + + elif event_name == CommandCompleted.__name__: + openlineage_event = self._parse_command_completed_event(e, self.ctx) # type: ignore[arg-type] + + node_unique_id = get_attribute(e, "data.node_info.unique_id") + + if node_unique_id: + if event_name == NodeStart.__name__: + openlineage_event = self._parse_node_start_event(e, self.ctx) # type: ignore[arg-type] + elif event_name == SQLQuery.__name__: + openlineage_event = self._parse_sql_query_event(e, self.ctx) # type: ignore[arg-type] + elif event_name in (SQLQueryStatus.__name__, CatchableExceptionOnRun.__name__): + openlineage_event = self._parse_sql_query_status_event(e, self.ctx) # type: ignore[arg-type] + elif event_name == NodeFinished.__name__: + openlineage_event = self.parse_node_finished_event(e, self.ctx) # type: ignore[arg-type] + + if openlineage_event: + self.emit(openlineage_event) + + def emit(self, openlineage_event: RunEvent): + self.client.emit(openlineage_event) + + def _parse_dbt_start_command_event(self, e: FoundStats, ctx: Context) -> RunEvent: + event_time = get_event_time(e.info.ts.seconds) + parent_run_facet = get_parent_run_facet() + dbt_version_facet = get_dbt_version_facet() + run_facets = {**parent_run_facet, **dbt_version_facet} + + job_type_facet = get_job_type_facet(e) + + event_run_id = str(generate_new_uuid()) + + start_event = generate_run_event( + event_type=RunState.START, + event_time=event_time, + run_id=event_run_id, + job_name=get_job_name(e, ctx), + job_namespace=get_job_namespace(), + run_facets=run_facets, + job_facets=job_type_facet, + ) + return start_event + + def _parse_command_completed_event(self, e: CommandCompleted, ctx: Context) -> RunEvent: + success = e.data.success + event_time = get_event_time(e.data.completed_at.seconds) + dbt_version_facet = get_dbt_version_facet() + parent_run_facet = get_parent_run_facet() + error_message_run_facet = {} + if success: + run_state = RunState.COMPLETE + else: + run_state = RunState.FAIL + error_message_run_facet = get_error_message_run_facet(e.info.msg) + + run_facets = {**parent_run_facet, **dbt_version_facet, **error_message_run_facet} + job_type_facet = get_job_type_facet(e) + + return generate_run_event( + event_type=run_state, + event_time=event_time, + run_id=self.dbt_command_metadata.run_id, + job_name=self.dbt_command_metadata.job_name, + job_namespace=self.dbt_command_metadata.job_namespace, + job_facets={**job_type_facet}, + run_facets=run_facets, + ) + + def _setup_dbt_command_metadata(self, start_event: RunEvent, ctx: Context): + self.dbt_command_metadata = ParentRunMetadata( + run_id=start_event.run.runId, + job_name=start_event.job.name, + job_namespace=start_event.job.namespace, + ) + + def _parse_node_start_event(self, e: NodeStart, ctx: Context) -> RunEvent: + node_unique_id = e.data.node_info.unique_id + node_start_time = e.data.node_info.node_started_at + + run_id = self.node_id_to_ol_run_id[node_unique_id] + parent_run_facet = get_dbt_command_parent_run_facet(self.dbt_command_metadata) + dbt_version_facet = get_dbt_version_facet() + + job_name = get_job_name(e, ctx) + job_type_facet = get_job_type_facet(e) + + dataset_namespace = extract_namespace(self._adapter_credentials) + inputs = [] + for input in get_model_inputs(node_unique_id, self._manifest): + dataset = node_to_dataset(input, dataset_namespace) + inputs.append( + InputDataset( + namespace=dataset.namespace, + name=dataset.name, + facets=dataset.facets, + ) + ) + + output_dataset = node_to_dataset(self._manifest.nodes[node_unique_id], dataset_namespace) + outputs = [ + OutputDataset( + namespace=output_dataset.namespace, + name=output_dataset.name, + facets=output_dataset.facets, + ) + ] + + run_facets = {**parent_run_facet, **dbt_version_facet} + run_event = generate_run_event( + event_type=RunState.START, + event_time=node_start_time, + run_id=run_id, + run_facets=run_facets, + job_name=job_name, + job_namespace=get_job_namespace(), + job_facets=job_type_facet, + inputs=inputs, + outputs=outputs, + ) + + self.node_id_to_node_start_event[node_unique_id] = run_event + + return run_event + + def parse_node_finished_event(self, e: NodeFinished, ctx: Context) -> RunEvent: + resource_type = e.data.node_info.resource_type + node_unique_id = e.data.node_info.unique_id + node_finished_time = e.data.node_info.node_finished_at or e.data.node_info.node_started_at + node_status = e.data.run_result.status + run_id = self.node_id_to_ol_run_id[node_unique_id] + parent_run_facet = get_dbt_command_parent_run_facet(self.dbt_command_metadata) + dbt_version_facet = get_dbt_version_facet() + + job_name = get_job_name(e, ctx) + job_type_facet = get_job_type_facet(e) + event_type = None + + error_message_run_facet = {} + + if node_status == NodeStatus.Skipped: + event_type = RunState.ABORT + elif node_status in (NodeStatus.Fail, NodeStatus.Error, NodeStatus.RuntimeErr): + event_type = RunState.FAIL + error_message_run_facet = get_error_message_run_facet(e.data.run_result.message) + elif node_status in (NodeStatus.Success, NodeStatus.Pass): + event_type = RunState.COMPLETE + else: + event_type = RunState.OTHER + + inputs = self.node_id_to_node_start_event[node_unique_id].inputs + outputs = self.node_id_to_node_start_event[node_unique_id].outputs + + run_facets = {**parent_run_facet, **dbt_version_facet, **error_message_run_facet} + + if resource_type == NodeType.Test: + success = e.data.node_info.node_status == NodeStatus.Pass + dataset_namespace = extract_namespace(self._adapter_credentials) + input_dataset = self._get_test_input_dataset( + node_unique_id, dataset_namespace, success + ) + if input_dataset: + inputs = [input_dataset] + + return generate_run_event( + event_type=event_type, + event_time=node_finished_time, + run_id=run_id, + run_facets=run_facets, + job_name=job_name, + job_namespace=get_job_namespace(), + job_facets=job_type_facet, + inputs=inputs, + outputs=outputs, + ) + + def _parse_sql_query_event(self, e: SQLQuery, ctx: Context) -> RunEvent: + node_unique_id = e.data.node_info.unique_id + sql_ol_run_id = str(generate_new_uuid()) + sql_start_at = get_event_time(e.info.ts.seconds) + + parent_run_facet = self._get_dbt_sql_node_parent_run_facet(e) + dbt_version_facet = get_dbt_version_facet() + run_facets = {**parent_run_facet, **dbt_version_facet} + + job_type_facet = get_job_type_facet(e) + sql_job_facet = get_sql_job_facet(e) + job_facets = {**job_type_facet, **sql_job_facet} + + sql_event = generate_run_event( + event_type=RunState.START, + event_time=sql_start_at, + run_id=sql_ol_run_id, + job_name=self._get_sql_job_name(e), + job_namespace=get_job_namespace(), + run_facets=run_facets, + job_facets=job_facets, + ) + + self.node_id_to_sql_start_event[node_unique_id] = sql_event + + return sql_event + + def _parse_sql_query_status_event( + self, e: Union[SQLQueryStatus, CatchableExceptionOnRun], ctx: Context + ) -> RunEvent: + """ + If the sql query is successful a SQLQueryStatus is generated by dbt. + In case of failure a CatchableExceptionOnRun is generated instead + """ + node_unique_id = e.data.node_info.unique_id + sql_ol_run_event = self.node_id_to_sql_start_event[node_unique_id] + + event_name = e.info.name + run_state = RunState.OTHER + event_time = get_event_time(e.info.ts.seconds) + run_facets = {} + if sql_ol_run_event.run.facets: + run_facets = {k: v for k, v in sql_ol_run_event.run.facets.items()} + + if event_name == SQLQueryStatus.__name__: + run_state = RunState.COMPLETE + elif event_name == CatchableExceptionOnRun.__name__: + run_state = RunState.FAIL + error_message = e.data.exc + stacktrace = e.data.exc_info + run_facets.update(get_error_message_run_facet(error_message, stacktrace)) + + return generate_run_event( + event_type=run_state, + event_time=event_time, + run_id=sql_ol_run_event.run.runId, + run_facets=run_facets, + job_name=sql_ol_run_event.job.name, + job_namespace=sql_ol_run_event.job.namespace, + job_facets=sql_ol_run_event.job.facets, + ) + + def _get_sql_job_name(self, e: SQLQuery) -> str: + """ + The name of the sql job is as follows + {node_job_name}.sql.{incremental_id} + """ + node_unique_id = e.data.node_info.unique_id + query_id = self._get_sql_query_id(node_unique_id) + job_name = f"{node_unique_id}.sql#{query_id}" + + return job_name + + def _get_data_quality_assertion_facet( + self, test_node_id: str, success: bool + ) -> Dict[str, data_quality_assertions_dataset.DataQualityAssertionsDatasetFacet]: + test_node = self._manifest.nodes[test_node_id] + data_quality_assertion_facet = {} + if isinstance(test_node, GenericTestNode): + test_name = test_node.test_metadata.name + column = get_test_column(test_node) + assertion = data_quality_assertions_dataset.Assertion( + assertion=test_name, success=success, column=column + ) + data_quality_assertion_facet = { + "dataQualityAssertions": data_quality_assertions_dataset.DataQualityAssertionsDatasetFacet( + assertions=[assertion] + ) + } + return data_quality_assertion_facet + + def _get_test_input_dataset( + self, test_node_id: str, dataset_namespace: str, success: bool + ) -> Optional[InputDataset]: + test_node = self._manifest.nodes[test_node_id] + input_dataset = None + if isinstance(test_node, GenericTestNode): + attached_node_id = test_node.attached_node + if attached_node_id: + assertion_facet = self._get_data_quality_assertion_facet(test_node_id, success) + attached_node = self._manifest.nodes.get( + attached_node_id + ) or self._manifest.sources.get(attached_node_id) + fqn: List[str] = [] + if hasattr(attached_node, "fqn"): + fqn = attached_node.fqn # type: ignore + attached_dataset_name = ".".join(fqn) + input_dataset = InputDataset( + namespace=dataset_namespace, + name=attached_dataset_name, + facets=assertion_facet, # type: ignore + ) + return input_dataset + + def _get_sql_query_id(self, node_id: str) -> int: + """ + Not all adapters have the sql id defined in their dbt event. + A node is executed by a single thread which means that sql queries of a single node are executed + sequentially and their status is also reported sequentially. + This function gives us an auto-incremented id for each sql query. + Each sql query is associated with a node_id. + """ + current_id = self.node_id_to_sql_query_id[node_id] + self.node_id_to_sql_query_id[node_id] += 1 + return current_id + + def _get_dbt_sql_node_parent_run_facet(self, e: SQLQuery) -> Dict: + node_unique_id = e.data.node_info.unique_id + node_start_run_id = self.node_id_to_ol_run_id[node_unique_id] + return { + "parent": ParentRunMetadata( + run_id=node_start_run_id, + job_name=get_job_name(e, self.ctx), + job_namespace=get_job_namespace(), + ).to_openlineage() + } diff --git a/core/setup.py b/core/setup.py index f07fe732068..ecae687ed28 100644 --- a/core/setup.py +++ b/core/setup.py @@ -84,6 +84,8 @@ "typing-extensions>=4.4", "pydantic<2", # ---- + # OpenLineage Dependencies + "openlineage-python==1.30.1", ], zip_safe=False, classifiers=[ diff --git a/dev-requirements.txt b/dev-requirements.txt index 54dece0ac7a..8ecb63d0a11 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -40,3 +40,5 @@ types-pytz types-requests types-setuptools mocker +# OpenLinage dependency +openlineage-python==1.30.1 diff --git a/tests/conftest.py b/tests/conftest.py index e756d795f97..756a3a478a2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,4 @@ # Import the fuctional fixtures as a plugin # Note: fixtures with session scope need to be local -pytest_plugins = ["dbt.tests.fixtures.project"] +pytest_plugins = ["dbt.tests.fixtures.project", "tests.openlineage_utils"] diff --git a/tests/fixtures/jaffle_shop.py b/tests/fixtures/jaffle_shop.py index 9b366ed2d5a..c901b80800a 100644 --- a/tests/fixtures/jaffle_shop.py +++ b/tests/fixtures/jaffle_shop.py @@ -399,13 +399,7 @@ def models(self): @pytest.fixture(scope="class") def seeds(self): - # Read seed file and return - seeds = {} - dir_path = os.path.dirname(os.path.realpath(__file__)) - for file_name in ("raw_customers.csv", "raw_orders.csv", "raw_payments.csv"): - contents = read_file(dir_path, "jaffle_shop_data", file_name) - seeds[file_name] = contents - return seeds + return get_jaffle_shop_seeds() @pytest.fixture(scope="class") def project_config_update(self): @@ -420,3 +414,12 @@ def project_config_update(self): } }, } + + +def get_jaffle_shop_seeds(): + seeds = {} + dir_path = os.path.dirname(os.path.realpath(__file__)) + for file_name in ("raw_customers.csv", "raw_orders.csv", "raw_payments.csv"): + contents = read_file(dir_path, "jaffle_shop_data", file_name) + seeds[file_name] = contents + return seeds diff --git a/tests/functional/openlineage/__init__.py b/tests/functional/openlineage/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/functional/openlineage/data/postgres/results/dbt_build_orders.json b/tests/functional/openlineage/data/postgres/results/dbt_build_orders.json new file mode 100644 index 00000000000..caa686427b4 --- /dev/null +++ b/tests/functional/openlineage/data/postgres/results/dbt_build_orders.json @@ -0,0 +1,5458 @@ +[ + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "JOB" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "MODEL" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.staging.stg_orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + }, + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.staging.stg_payments", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "payment_id", + "type": "integer", + "description": "", + "fields": [] + }, + { + "name": "payment_method", + "type": "string", + "description": "", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "This is a unique identifier for an order", + "fields": [] + }, + { + "name": "customer_id", + "type": "integer", + "description": "Foreign key to the customers table", + "fields": [] + }, + { + "name": "order_date", + "type": "date", + "description": "Date (UTC) that the order was placed", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields": [] + }, + { + "name": "amount", + "type": "float", + "description": "Total amount (AUD) of the order", + "fields": [] + }, + { + "name": "credit_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by credit card", + "fields": [] + }, + { + "name": "coupon_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by coupon", + "fields": [] + }, + { + "name": "bank_transfer_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by bank transfer", + "fields": [] + }, + { + "name": "gift_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by gift card", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\n\n \n \n\n create table \"dbt\".\"{{ .* }}_openlineage_project\".\"orders__dbt_tmp\"\n \n \n as\n \n (\n \n\nwith orders as (\n\n select * from \"dbt\".\"{{ .* }}_openlineage_project\".\"stg_orders\"\n\n),\n\npayments as (\n\n select * from \"dbt\".\"{{ .* }}_openlineage_project\".\"stg_payments\"\n\n),\n\norder_payments as (\n\n select\n order_id,\n\n sum(case when payment_method = 'credit_card' then amount else 0 end) as credit_card_amount,\n sum(case when payment_method = 'coupon' then amount else 0 end) as coupon_amount,\n sum(case when payment_method = 'bank_transfer' then amount else 0 end) as bank_transfer_amount,\n sum(case when payment_method = 'gift_card' then amount else 0 end) as gift_card_amount,\n sum(amount) as total_amount\n\n from payments\n\n group by order_id\n\n),\n\nfinal as (\n\n select\n orders.order_id,\n orders.customer_id,\n orders.order_date,\n orders.status,\n\n order_payments.credit_card_amount,\n\n order_payments.coupon_amount,\n\n order_payments.bank_transfer_amount,\n\n order_payments.gift_card_amount,\n\n order_payments.total_amount as amount\n\n from orders\n\n\n left join order_payments\n on orders.order_id = order_payments.order_id\n\n)\n\nselect * from final\n );\n " + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\n\n \n \n\n create table \"dbt\".\"{{ .* }}_openlineage_project\".\"orders__dbt_tmp\"\n \n \n as\n \n (\n \n\nwith orders as (\n\n select * from \"dbt\".\"{{ .* }}_openlineage_project\".\"stg_orders\"\n\n),\n\npayments as (\n\n select * from \"dbt\".\"{{ .* }}_openlineage_project\".\"stg_payments\"\n\n),\n\norder_payments as (\n\n select\n order_id,\n\n sum(case when payment_method = 'credit_card' then amount else 0 end) as credit_card_amount,\n sum(case when payment_method = 'coupon' then amount else 0 end) as coupon_amount,\n sum(case when payment_method = 'bank_transfer' then amount else 0 end) as bank_transfer_amount,\n sum(case when payment_method = 'gift_card' then amount else 0 end) as gift_card_amount,\n sum(amount) as total_amount\n\n from payments\n\n group by order_id\n\n),\n\nfinal as (\n\n select\n orders.order_id,\n orders.customer_id,\n orders.order_date,\n orders.status,\n\n order_payments.credit_card_amount,\n\n order_payments.coupon_amount,\n\n order_payments.bank_transfer_amount,\n\n order_payments.gift_card_amount,\n\n order_payments.total_amount as amount\n\n from orders\n\n\n left join order_payments\n on orders.order_id = order_payments.order_id\n\n)\n\nselect * from final\n );\n " + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders.sql#3", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\nalter table \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\" rename to \"orders__dbt_backup\"" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders.sql#3", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\nalter table \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\" rename to \"orders__dbt_backup\"" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders.sql#4", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\nalter table \"dbt\".\"{{ .* }}_openlineage_project\".\"orders__dbt_tmp\" rename to \"orders\"" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders.sql#4", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\nalter table \"dbt\".\"{{ .* }}_openlineage_project\".\"orders__dbt_tmp\" rename to \"orders\"" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders.sql#5", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "COMMIT" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders.sql#5", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "COMMIT" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders.sql#6", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\ndrop table if exists \"dbt\".\"{{ .* }}_openlineage_project\".\"orders__dbt_backup\" cascade" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders.sql#6", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\ndrop table if exists \"dbt\".\"{{ .* }}_openlineage_project\".\"orders__dbt_backup\" cascade" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "MODEL" + } + } + }, + "eventType": "COMPLETE", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.staging.stg_orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + }, + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.staging.stg_payments", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "payment_id", + "type": "integer", + "description": "", + "fields": [] + }, + { + "name": "payment_method", + "type": "string", + "description": "", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "This is a unique identifier for an order", + "fields": [] + }, + { + "name": "customer_id", + "type": "integer", + "description": "Foreign key to the customers table", + "fields": [] + }, + { + "name": "order_date", + "type": "date", + "description": "Date (UTC) that the order was placed", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields": [] + }, + { + "name": "amount", + "type": "float", + "description": "Total amount (AUD) of the order", + "fields": [] + }, + { + "name": "credit_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by credit card", + "fields": [] + }, + { + "name": "coupon_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by coupon", + "fields": [] + }, + { + "name": "bank_transfer_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by bank transfer", + "fields": [] + }, + { + "name": "gift_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by gift card", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "This is a unique identifier for an order", + "fields": [] + }, + { + "name": "customer_id", + "type": "integer", + "description": "Foreign key to the customers table", + "fields": [] + }, + { + "name": "order_date", + "type": "date", + "description": "Date (UTC) that the order was placed", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields": [] + }, + { + "name": "amount", + "type": "float", + "description": "Total amount (AUD) of the order", + "fields": [] + }, + { + "name": "credit_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by credit card", + "fields": [] + }, + { + "name": "coupon_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by coupon", + "fields": [] + }, + { + "name": "bank_transfer_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by bank transfer", + "fields": [] + }, + { + "name": "gift_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by gift card", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\nwith all_values as (\n\n select\n status as value_field,\n count(*) as n_records\n\n from \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\n group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n 'placed','shipped','completed','return_pending','returned'\n)\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\nwith all_values as (\n\n select\n status as value_field,\n count(*) as n_records\n\n from \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\n group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n 'placed','shipped','completed','return_pending','returned'\n)\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "COMPLETE", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataQualityAssertions": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions": [ + { + "assertion": "accepted_values", + "success": true, + "column": "status" + } + ] + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_amount.106140f9fd", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "This is a unique identifier for an order", + "fields": [] + }, + { + "name": "customer_id", + "type": "integer", + "description": "Foreign key to the customers table", + "fields": [] + }, + { + "name": "order_date", + "type": "date", + "description": "Date (UTC) that the order was placed", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields": [] + }, + { + "name": "amount", + "type": "float", + "description": "Total amount (AUD) of the order", + "fields": [] + }, + { + "name": "credit_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by credit card", + "fields": [] + }, + { + "name": "coupon_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by coupon", + "fields": [] + }, + { + "name": "bank_transfer_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by bank transfer", + "fields": [] + }, + { + "name": "gift_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by gift card", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.not_null_orders_amount", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_amount.106140f9fd" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_amount.106140f9fd.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_amount.106140f9fd" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_amount.106140f9fd.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_amount.106140f9fd" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_amount.106140f9fd.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_amount.106140f9fd\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_amount.106140f9fd" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_amount.106140f9fd.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_amount.106140f9fd\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_amount.106140f9fd", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "COMPLETE", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataQualityAssertions": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions": [ + { + "assertion": "not_null", + "success": true, + "column": "amount" + } + ] + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.not_null_orders_amount", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "This is a unique identifier for an order", + "fields": [] + }, + { + "name": "customer_id", + "type": "integer", + "description": "Foreign key to the customers table", + "fields": [] + }, + { + "name": "order_date", + "type": "date", + "description": "Date (UTC) that the order was placed", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields": [] + }, + { + "name": "amount", + "type": "float", + "description": "Total amount (AUD) of the order", + "fields": [] + }, + { + "name": "credit_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by credit card", + "fields": [] + }, + { + "name": "coupon_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by coupon", + "fields": [] + }, + { + "name": "bank_transfer_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by bank transfer", + "fields": [] + }, + { + "name": "gift_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by gift card", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.not_null_orders_bank_transfer_amount", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect bank_transfer_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere bank_transfer_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect bank_transfer_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere bank_transfer_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "COMPLETE", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataQualityAssertions": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions": [ + { + "assertion": "not_null", + "success": true, + "column": "bank_transfer_amount" + } + ] + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.not_null_orders_bank_transfer_amount", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "This is a unique identifier for an order", + "fields": [] + }, + { + "name": "customer_id", + "type": "integer", + "description": "Foreign key to the customers table", + "fields": [] + }, + { + "name": "order_date", + "type": "date", + "description": "Date (UTC) that the order was placed", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields": [] + }, + { + "name": "amount", + "type": "float", + "description": "Total amount (AUD) of the order", + "fields": [] + }, + { + "name": "credit_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by credit card", + "fields": [] + }, + { + "name": "coupon_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by coupon", + "fields": [] + }, + { + "name": "bank_transfer_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by bank transfer", + "fields": [] + }, + { + "name": "gift_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by gift card", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.not_null_orders_coupon_amount", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect coupon_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere coupon_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect coupon_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere coupon_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "COMPLETE", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataQualityAssertions": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions": [ + { + "assertion": "not_null", + "success": true, + "column": "coupon_amount" + + } + ] + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.not_null_orders_coupon_amount", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "This is a unique identifier for an order", + "fields": [] + }, + { + "name": "customer_id", + "type": "integer", + "description": "Foreign key to the customers table", + "fields": [] + }, + { + "name": "order_date", + "type": "date", + "description": "Date (UTC) that the order was placed", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields": [] + }, + { + "name": "amount", + "type": "float", + "description": "Total amount (AUD) of the order", + "fields": [] + }, + { + "name": "credit_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by credit card", + "fields": [] + }, + { + "name": "coupon_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by coupon", + "fields": [] + }, + { + "name": "bank_transfer_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by bank transfer", + "fields": [] + }, + { + "name": "gift_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by gift card", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.not_null_orders_credit_card_amount", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect credit_card_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere credit_card_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect credit_card_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere credit_card_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "COMPLETE", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataQualityAssertions": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions": [ + { + "assertion": "not_null", + "success": true, + "column": "credit_card_amount" + } + ] + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.not_null_orders_credit_card_amount", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_customer_id.c5f02694af", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "This is a unique identifier for an order", + "fields": [] + }, + { + "name": "customer_id", + "type": "integer", + "description": "Foreign key to the customers table", + "fields": [] + }, + { + "name": "order_date", + "type": "date", + "description": "Date (UTC) that the order was placed", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields": [] + }, + { + "name": "amount", + "type": "float", + "description": "Total amount (AUD) of the order", + "fields": [] + }, + { + "name": "credit_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by credit card", + "fields": [] + }, + { + "name": "coupon_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by coupon", + "fields": [] + }, + { + "name": "bank_transfer_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by bank transfer", + "fields": [] + }, + { + "name": "gift_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by gift card", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.not_null_orders_customer_id", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_customer_id.c5f02694af" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_customer_id.c5f02694af.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_customer_id.c5f02694af" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_customer_id.c5f02694af.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_customer_id.c5f02694af" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_customer_id.c5f02694af.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_customer_id.c5f02694af\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect customer_id\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere customer_id is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_customer_id.c5f02694af" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_customer_id.c5f02694af.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_customer_id.c5f02694af\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect customer_id\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere customer_id is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_customer_id.c5f02694af", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "COMPLETE", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataQualityAssertions": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions": [ + { + "assertion": "not_null", + "success": true, + "column": "customer_id" + } + ] + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.not_null_orders_customer_id", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "This is a unique identifier for an order", + "fields": [] + }, + { + "name": "customer_id", + "type": "integer", + "description": "Foreign key to the customers table", + "fields": [] + }, + { + "name": "order_date", + "type": "date", + "description": "Date (UTC) that the order was placed", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields": [] + }, + { + "name": "amount", + "type": "float", + "description": "Total amount (AUD) of the order", + "fields": [] + }, + { + "name": "credit_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by credit card", + "fields": [] + }, + { + "name": "coupon_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by coupon", + "fields": [] + }, + { + "name": "bank_transfer_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by bank transfer", + "fields": [] + }, + { + "name": "gift_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by gift card", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.not_null_orders_gift_card_amount", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect gift_card_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere gift_card_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect gift_card_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere gift_card_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "COMPLETE", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataQualityAssertions": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions": [ + { + "assertion": "not_null", + "success": true, + "column": "gift_card_amount" + + } + ] + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.not_null_orders_gift_card_amount", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_order_id.cf6c17daed", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "This is a unique identifier for an order", + "fields": [] + }, + { + "name": "customer_id", + "type": "integer", + "description": "Foreign key to the customers table", + "fields": [] + }, + { + "name": "order_date", + "type": "date", + "description": "Date (UTC) that the order was placed", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields": [] + }, + { + "name": "amount", + "type": "float", + "description": "Total amount (AUD) of the order", + "fields": [] + }, + { + "name": "credit_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by credit card", + "fields": [] + }, + { + "name": "coupon_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by coupon", + "fields": [] + }, + { + "name": "bank_transfer_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by bank transfer", + "fields": [] + }, + { + "name": "gift_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by gift card", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.not_null_orders_order_id", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_order_id.cf6c17daed" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_order_id.cf6c17daed.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_order_id.cf6c17daed" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_order_id.cf6c17daed.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_order_id.cf6c17daed" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_order_id.cf6c17daed.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_order_id.cf6c17daed\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect order_id\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere order_id is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_order_id.cf6c17daed" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_order_id.cf6c17daed.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_order_id.cf6c17daed\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect order_id\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere order_id is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.not_null_orders_order_id.cf6c17daed", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "COMPLETE", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataQualityAssertions": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions": [ + { + "assertion": "not_null", + "success": true, + "column": "order_id" + + } + ] + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.not_null_orders_order_id", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.customers", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "customer_id", + "type": "integer", + "description": "This is a unique identifier for a customer", + "fields": [] + }, + { + "name": "first_name", + "type": "string", + "description": "Customer's first name. PII.", + "fields": [] + }, + { + "name": "last_name", + "type": "string", + "description": "Customer's last name. PII.", + "fields": [] + }, + { + "name": "first_order", + "type": "date", + "description": "Date (UTC) of a customer's first order", + "fields": [] + }, + { + "name": "most_recent_order", + "type": "date", + "description": "Date (UTC) of a customer's most recent order", + "fields": [] + }, + { + "name": "number_of_orders", + "type": "integer", + "description": "Count of the number of orders a customer has placed", + "fields": [] + }, + { + "name": "total_order_amount", + "type": "float", + "description": "Total value (AUD) of a customer's orders", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "This table has basic information about a customer, as well as some derived facts based on a customer's orders" + } + } + }, + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "This is a unique identifier for an order", + "fields": [] + }, + { + "name": "customer_id", + "type": "integer", + "description": "Foreign key to the customers table", + "fields": [] + }, + { + "name": "order_date", + "type": "date", + "description": "Date (UTC) that the order was placed", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields": [] + }, + { + "name": "amount", + "type": "float", + "description": "Total amount (AUD) of the order", + "fields": [] + }, + { + "name": "credit_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by credit card", + "fields": [] + }, + { + "name": "coupon_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by coupon", + "fields": [] + }, + { + "name": "bank_transfer_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by bank transfer", + "fields": [] + }, + { + "name": "gift_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by gift card", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\nwith child as (\n select customer_id as from_field\n from \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\n where customer_id is not null\n),\n\nparent as (\n select customer_id as to_field\n from \"dbt\".\"{{ .* }}_openlineage_project\".\"customers\"\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\nwith child as (\n select customer_id as from_field\n from \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\n where customer_id is not null\n),\n\nparent as (\n select customer_id as to_field\n from \"dbt\".\"{{ .* }}_openlineage_project\".\"customers\"\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "COMPLETE", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataQualityAssertions": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions": [ + { + "assertion": "relationships", + "success": true, + "column": "customer_id" + } + ] + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.unique_orders_order_id.fed79b3a6e", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "This is a unique identifier for an order", + "fields": [] + }, + { + "name": "customer_id", + "type": "integer", + "description": "Foreign key to the customers table", + "fields": [] + }, + { + "name": "order_date", + "type": "date", + "description": "Date (UTC) that the order was placed", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields": [] + }, + { + "name": "amount", + "type": "float", + "description": "Total amount (AUD) of the order", + "fields": [] + }, + { + "name": "credit_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by credit card", + "fields": [] + }, + { + "name": "coupon_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by coupon", + "fields": [] + }, + { + "name": "bank_transfer_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by bank transfer", + "fields": [] + }, + { + "name": "gift_card_amount", + "type": "float", + "description": "Amount of the order (AUD) paid for by gift card", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.unique_orders_order_id", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.unique_orders_order_id.fed79b3a6e" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.unique_orders_order_id.fed79b3a6e.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.unique_orders_order_id.fed79b3a6e" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.unique_orders_order_id.fed79b3a6e.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.unique_orders_order_id.fed79b3a6e" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.unique_orders_order_id.fed79b3a6e.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.unique_orders_order_id.fed79b3a6e\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\nselect\n order_id as unique_field,\n count(*) as n_records\n\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere order_id is not null\ngroup by order_id\nhaving count(*) > 1\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.unique_orders_order_id.fed79b3a6e" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.unique_orders_order_id.fed79b3a6e.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.unique_orders_order_id.fed79b3a6e\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\nselect\n order_id as unique_field,\n count(*) as n_records\n\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere order_id is not null\ngroup by order_id\nhaving count(*) > 1\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.unique_orders_order_id.fed79b3a6e", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "COMPLETE", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders", + "facets": { + "dataQualityAssertions": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions": [ + { + "assertion": "unique", + "success": true, + "column": "order_id" + + } + ] + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.unique_orders_order_id", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "JOB" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + } +] diff --git a/tests/functional/openlineage/data/postgres/results/dbt_build_orders_with_failed_test.json b/tests/functional/openlineage/data/postgres/results/dbt_build_orders_with_failed_test.json new file mode 100644 index 00000000000..022a8d121df --- /dev/null +++ b/tests/functional/openlineage/data/postgres/results/dbt_build_orders_with_failed_test.json @@ -0,0 +1,1262 @@ +[ + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders_with_failed_test", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "JOB" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders_with_failed_test" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "MODEL" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.staging.stg_orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + }, + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.staging.stg_payments", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "payment_id", + "type": "integer", + "description": "", + "fields": [] + }, + { + "name": "payment_method", + "type": "string", + "description": "", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders_with_failed_test", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "dummy model that has failed test" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders_with_failed_test\"} */\n\n \n \n\n create table \"dbt\".\"{{ .* }}openlineage_project\".\"orders_with_failed_test__dbt_tmp\"\n \n \n as\n \n (\n \n\nwith orders as (\n\n select * from \"dbt\".\"{{ .* }}openlineage_project\".\"stg_orders\"\n\n),\n\npayments as (\n\n select * from \"dbt\".\"{{ .* }}openlineage_project\".\"stg_payments\"\n\n),\n\norder_payments as (\n\n select\n order_id,\n\n sum(case when payment_method = 'credit_card' then amount else 0 end) as credit_card_amount,\n sum(case when payment_method = 'coupon' then amount else 0 end) as coupon_amount,\n sum(case when payment_method = 'bank_transfer' then amount else 0 end) as bank_transfer_amount,\n sum(case when payment_method = 'gift_card' then amount else 0 end) as gift_card_amount,\n sum(amount) as total_amount\n\n from payments\n\n group by order_id\n\n),\n\nfinal as (\n\n select\n orders.order_id,\n orders.customer_id,\n orders.order_date,\n orders.status,\n\n order_payments.credit_card_amount,\n\n order_payments.coupon_amount,\n\n order_payments.bank_transfer_amount,\n\n order_payments.gift_card_amount,\n\n order_payments.total_amount as amount\n\n from orders\n\n\n left join order_payments\n on orders.order_id = order_payments.order_id\n\n)\n\nselect * from final\n );\n " + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders_with_failed_test\"} */\n\n \n \n\n create table \"dbt\".\"{{ .* }}openlineage_project\".\"orders_with_failed_test__dbt_tmp\"\n \n \n as\n \n (\n \n\nwith orders as (\n\n select * from \"dbt\".\"{{ .* }}openlineage_project\".\"stg_orders\"\n\n),\n\npayments as (\n\n select * from \"dbt\".\"{{ .* }}openlineage_project\".\"stg_payments\"\n\n),\n\norder_payments as (\n\n select\n order_id,\n\n sum(case when payment_method = 'credit_card' then amount else 0 end) as credit_card_amount,\n sum(case when payment_method = 'coupon' then amount else 0 end) as coupon_amount,\n sum(case when payment_method = 'bank_transfer' then amount else 0 end) as bank_transfer_amount,\n sum(case when payment_method = 'gift_card' then amount else 0 end) as gift_card_amount,\n sum(amount) as total_amount\n\n from payments\n\n group by order_id\n\n),\n\nfinal as (\n\n select\n orders.order_id,\n orders.customer_id,\n orders.order_date,\n orders.status,\n\n order_payments.credit_card_amount,\n\n order_payments.coupon_amount,\n\n order_payments.bank_transfer_amount,\n\n order_payments.gift_card_amount,\n\n order_payments.total_amount as amount\n\n from orders\n\n\n left join order_payments\n on orders.order_id = order_payments.order_id\n\n)\n\nselect * from final\n );\n " + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test.sql#3", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders_with_failed_test\"} */\nalter table \"dbt\".\"{{ .* }}openlineage_project\".\"orders_with_failed_test__dbt_tmp\" rename to \"orders_with_failed_test\"" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test.sql#3", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders_with_failed_test\"} */\nalter table \"dbt\".\"{{ .* }}openlineage_project\".\"orders_with_failed_test__dbt_tmp\" rename to \"orders_with_failed_test\"" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test.sql#4", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "COMMIT" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test.sql#4", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "COMMIT" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test.sql#5", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders_with_failed_test\"} */\ndrop table if exists \"dbt\".\"{{ .* }}openlineage_project\".\"orders_with_failed_test__dbt_backup\" cascade" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test.sql#5", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders_with_failed_test\"} */\ndrop table if exists \"dbt\".\"{{ .* }}openlineage_project\".\"orders_with_failed_test__dbt_backup\" cascade" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders_with_failed_test" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_failed_test", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "MODEL" + } + } + }, + "eventType": "COMPLETE", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.staging.stg_orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + }, + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.staging.stg_payments", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "payment_id", + "type": "integer", + "description": "", + "fields": [] + }, + { + "name": "payment_method", + "type": "string", + "description": "", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders_with_failed_test", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "dummy model that has failed test" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders_with_failed_test" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_with_failed_test_order_id__99.ba4a43b70a", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders_with_failed_test", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "dummy model that has failed test" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.accepted_values_orders_with_failed_test_order_id__99", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_with_failed_test_order_id__99.ba4a43b70a" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_with_failed_test_order_id__99.ba4a43b70a.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_with_failed_test_order_id__99.ba4a43b70a" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_with_failed_test_order_id__99.ba4a43b70a.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "BEGIN" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_with_failed_test_order_id__99.ba4a43b70a" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_with_failed_test_order_id__99.ba4a43b70a.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.accepted_values_orders_with_failed_test_order_id__99.ba4a43b70a\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\nwith all_values as (\n\n select\n order_id as value_field,\n count(*) as n_records\n\n from \"dbt\".\"{{ .* }}openlineage_project\".\"orders_with_failed_test\"\n group by order_id\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n '99'\n)\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_with_failed_test_order_id__99.ba4a43b70a" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_with_failed_test_order_id__99.ba4a43b70a.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.accepted_values_orders_with_failed_test_order_id__99.ba4a43b70a\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\nwith all_values as (\n\n select\n order_id as value_field,\n count(*) as n_records\n\n from \"dbt\".\"{{ .* }}openlineage_project\".\"orders_with_failed_test\"\n group by order_id\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n '99'\n)\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders_with_failed_test" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + }, + "errorMessage": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ErrorMessageRunFacet.json#/$defs/ErrorMessageRunFacet", + "message": "Got 98 results, configured to fail if != 0", + "programmingLanguage": "sql", + "stackTrace": null + } + } + }, + "job": { + "namespace": "dbt", + "name": "test.jaffle_shop.accepted_values_orders_with_failed_test_order_id__99.ba4a43b70a", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "TEST" + } + } + }, + "eventType": "FAIL", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders_with_failed_test", + "facets": { + "dataQualityAssertions": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions": [ + { + "assertion": "accepted_values", + "success": false, + "column": "order_id" + + } + ] + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.accepted_values_orders_with_failed_test_order_id__99", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + }, + "errorMessage": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/{{ .* }}/1-0-1/ErrorMessageRunFacet.json#/$defs/ErrorMessageRunFacet", + "message": "Command `cli build` failed {{ .* }}", + "programmingLanguage": "sql", + "stackTrace": null + } + } + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders_with_failed_test", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "JOB" + } + } + }, + "eventType": "FAIL", + "inputs": [], + "outputs": [] + } +] diff --git a/tests/functional/openlineage/data/postgres/results/dbt_run_orders.json b/tests/functional/openlineage/data/postgres/results/dbt_run_orders.json new file mode 100644 index 00000000000..97325e95d28 --- /dev/null +++ b/tests/functional/openlineage/data/postgres/results/dbt_run_orders.json @@ -0,0 +1,1010 @@ +[ + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"JOB" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"MODEL" + } + } + }, + "eventType":"START", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.staging.stg_orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"", + "fields":[ ] + }, + { + "name":"status", + "type":"string", + "description":"", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + }, + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.staging.stg_payments", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"payment_id", + "type":"integer", + "description":"", + "fields":[ ] + }, + { + "name":"payment_method", + "type":"string", + "description":"", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"This is a unique identifier for an order", + "fields":[ ] + }, + { + "name":"customer_id", + "type":"integer", + "description":"Foreign key to the customers table", + "fields":[ ] + }, + { + "name":"order_date", + "type":"date", + "description":"Date (UTC) that the order was placed", + "fields":[ ] + }, + { + "name":"status", + "type":"string", + "description":"Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields":[ ] + }, + { + "name":"amount", + "type":"float", + "description":"Total amount (AUD) of the order", + "fields":[ ] + }, + { + "name":"credit_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by credit card", + "fields":[ ] + }, + { + "name":"coupon_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by coupon", + "fields":[ ] + }, + { + "name":"bank_transfer_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by bank transfer", + "fields":[ ] + }, + { + "name":"gift_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by gift card", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\n\n \n \n\n create table \"dbt\".\"{{ .* }}_openlineage_project\".\"orders__dbt_tmp\"\n \n \n as\n \n (\n \n\nwith orders as (\n\n select * from \"dbt\".\"{{ .* }}_openlineage_project\".\"stg_orders\"\n\n),\n\npayments as (\n\n select * from \"dbt\".\"{{ .* }}_openlineage_project\".\"stg_payments\"\n\n),\n\norder_payments as (\n\n select\n order_id,\n\n sum(case when payment_method = 'credit_card' then amount else 0 end) as credit_card_amount,\n sum(case when payment_method = 'coupon' then amount else 0 end) as coupon_amount,\n sum(case when payment_method = 'bank_transfer' then amount else 0 end) as bank_transfer_amount,\n sum(case when payment_method = 'gift_card' then amount else 0 end) as gift_card_amount,\n sum(amount) as total_amount\n\n from payments\n\n group by order_id\n\n),\n\nfinal as (\n\n select\n orders.order_id,\n orders.customer_id,\n orders.order_date,\n orders.status,\n\n order_payments.credit_card_amount,\n\n order_payments.coupon_amount,\n\n order_payments.bank_transfer_amount,\n\n order_payments.gift_card_amount,\n\n order_payments.total_amount as amount\n\n from orders\n\n\n left join order_payments\n on orders.order_id = order_payments.order_id\n\n)\n\nselect * from final\n );\n " + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\n\n \n \n\n create table \"dbt\".\"{{ .* }}_openlineage_project\".\"orders__dbt_tmp\"\n \n \n as\n \n (\n \n\nwith orders as (\n\n select * from \"dbt\".\"{{ .* }}_openlineage_project\".\"stg_orders\"\n\n),\n\npayments as (\n\n select * from \"dbt\".\"{{ .* }}_openlineage_project\".\"stg_payments\"\n\n),\n\norder_payments as (\n\n select\n order_id,\n\n sum(case when payment_method = 'credit_card' then amount else 0 end) as credit_card_amount,\n sum(case when payment_method = 'coupon' then amount else 0 end) as coupon_amount,\n sum(case when payment_method = 'bank_transfer' then amount else 0 end) as bank_transfer_amount,\n sum(case when payment_method = 'gift_card' then amount else 0 end) as gift_card_amount,\n sum(amount) as total_amount\n\n from payments\n\n group by order_id\n\n),\n\nfinal as (\n\n select\n orders.order_id,\n orders.customer_id,\n orders.order_date,\n orders.status,\n\n order_payments.credit_card_amount,\n\n order_payments.coupon_amount,\n\n order_payments.bank_transfer_amount,\n\n order_payments.gift_card_amount,\n\n order_payments.total_amount as amount\n\n from orders\n\n\n left join order_payments\n on orders.order_id = order_payments.order_id\n\n)\n\nselect * from final\n );\n " + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders.sql#3", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\nalter table \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\" rename to \"orders__dbt_backup\"" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders.sql#3", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\nalter table \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\" rename to \"orders__dbt_backup\"" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders.sql#4", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\nalter table \"dbt\".\"{{ .* }}_openlineage_project\".\"orders__dbt_tmp\" rename to \"orders\"" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders.sql#4", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\nalter table \"dbt\".\"{{ .* }}_openlineage_project\".\"orders__dbt_tmp\" rename to \"orders\"" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders.sql#5", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"COMMIT" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders.sql#5", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"COMMIT" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders.sql#6", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\ndrop table if exists \"dbt\".\"{{ .* }}_openlineage_project\".\"orders__dbt_backup\" cascade" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders.sql#6", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders\"} */\ndrop table if exists \"dbt\".\"{{ .* }}_openlineage_project\".\"orders__dbt_backup\" cascade" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"model.jaffle_shop.orders", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"MODEL" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.staging.stg_orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"", + "fields":[ ] + }, + { + "name":"status", + "type":"string", + "description":"", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + }, + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.staging.stg_payments", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"payment_id", + "type":"integer", + "description":"", + "fields":[ ] + }, + { + "name":"payment_method", + "type":"string", + "description":"", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"This is a unique identifier for an order", + "fields":[ ] + }, + { + "name":"customer_id", + "type":"integer", + "description":"Foreign key to the customers table", + "fields":[ ] + }, + { + "name":"order_date", + "type":"date", + "description":"Date (UTC) that the order was placed", + "fields":[ ] + }, + { + "name":"status", + "type":"string", + "description":"Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields":[ ] + }, + { + "name":"amount", + "type":"float", + "description":"Total amount (AUD) of the order", + "fields":[ ] + }, + { + "name":"credit_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by credit card", + "fields":[ ] + }, + { + "name":"coupon_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by coupon", + "fields":[ ] + }, + { + "name":"bank_transfer_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by bank transfer", + "fields":[ ] + }, + { + "name":"gift_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by gift card", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"JOB" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + } +] diff --git a/tests/functional/openlineage/data/postgres/results/dbt_run_orders_with_syntax_error.json b/tests/functional/openlineage/data/postgres/results/dbt_run_orders_with_syntax_error.json new file mode 100644 index 00000000000..80f629eaf51 --- /dev/null +++ b/tests/functional/openlineage/data/postgres/results/dbt_run_orders_with_syntax_error.json @@ -0,0 +1,513 @@ +[ + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders_with_syntax_error", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "_deleted": null, + "processingType": "BATCH", + "integration": "DBT", + "jobType": "JOB" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders_with_syntax_error" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_syntax_error", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "_deleted": null, + "processingType": "BATCH", + "integration": "DBT", + "jobType": "MODEL" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.staging.stg_orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "_deleted": null, + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "_deleted": null, + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "_deleted": null, + "description": "" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders_with_syntax_error", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "_deleted": null, + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "_deleted": null, + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "This is a unique identifier for an order", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "_deleted": null, + "description": "dummy model that has SQL syntax error" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_syntax_error" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_syntax_error.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "_deleted": null, + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "_deleted": null, + "query": "BEGIN" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_syntax_error" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_syntax_error.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "_deleted": null, + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "_deleted": null, + "query": "BEGIN" + } + } + }, + "eventType": "COMPLETE", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_syntax_error" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_syntax_error.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "_deleted": null, + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "_deleted": null, + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders_with_syntax_error\"} */\n\n \n \n\n create table \"dbt\".\"{{ .* }}_openlineage_project\".\"orders_with_syntax_error__dbt_tmp\"\n \n \n as\n \n (\n \n\nwith orders as (\n\n select * from \"dbt\".\"{{ .* }}_openlineage_project\".\"stg_orders\"\n\n),\n\nSELECT order_id,\nFROM orders\n\nSQL Syntax Error here\n );\n " + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_syntax_error" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + }, + "errorMessage": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ErrorMessageRunFacet.json#/$defs/ErrorMessageRunFacet", + "message": "Database Error in model orders_with_syntax_error (models/orders_with_syntax_error.sql)\n syntax error at or near \"SELECT\"\n LINE 20: SELECT order_id,\n ^\n compiled code at target/run/jaffle_shop/models/orders_with_syntax_error.sql", + "programmingLanguage": "sql", + "stackTrace": "Traceback (most recent call last):\n{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_syntax_error.sql#2", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "_deleted": null, + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "_deleted": null, + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"model.jaffle_shop.orders_with_syntax_error\"} */\n\n \n \n\n create table \"dbt\".\"{{ .* }}_openlineage_project\".\"orders_with_syntax_error__dbt_tmp\"\n \n \n as\n \n (\n \n\nwith orders as (\n\n select * from \"dbt\".\"{{ .* }}_openlineage_project\".\"stg_orders\"\n\n),\n\nSELECT order_id,\nFROM orders\n\nSQL Syntax Error here\n );\n " + } + } + }, + "eventType": "FAIL", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders_with_syntax_error" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + }, + "errorMessage": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ErrorMessageRunFacet.json#/$defs/ErrorMessageRunFacet", + "message": "Database Error in model orders_with_syntax_error (models/orders_with_syntax_error.sql)\n syntax error at or near \"SELECT\"\n LINE 20: SELECT order_id,\n ^\n compiled code at target/run/jaffle_shop/models/orders_with_syntax_error.sql", + "programmingLanguage": "sql", + "stackTrace": null + } + } + }, + "job": { + "namespace": "dbt", + "name": "model.jaffle_shop.orders_with_syntax_error", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "_deleted": null, + "processingType": "BATCH", + "integration": "DBT", + "jobType": "MODEL" + } + } + }, + "eventType": "FAIL", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.staging.stg_orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "_deleted": null, + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "_deleted": null, + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "", + "fields": [] + }, + { + "name": "status", + "type": "string", + "description": "", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "_deleted": null, + "description": "" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders_with_syntax_error", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "_deleted": null, + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/1-1-1/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "_deleted": null, + "fields": [ + { + "name": "order_id", + "type": "integer", + "description": "This is a unique identifier for an order", + "fields": [] + } + ] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "_deleted": null, + "description": "dummy model that has SQL syntax error" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + }, + "errorMessage": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ErrorMessageRunFacet.json#/$defs/ErrorMessageRunFacet", + "message": "Command `cli run` failed at {{ .* }}", + "programmingLanguage": "sql", + "stackTrace": null + } + } + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders_with_syntax_error", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "_deleted": null, + "processingType": "BATCH", + "integration": "DBT", + "jobType": "JOB" + } + } + }, + "eventType": "FAIL", + "inputs": [], + "outputs": [] + } +] diff --git a/tests/functional/openlineage/data/postgres/results/dbt_seed_raw_countries.json b/tests/functional/openlineage/data/postgres/results/dbt_seed_raw_countries.json new file mode 100644 index 00000000000..bdfcdd384ab --- /dev/null +++ b/tests/functional/openlineage/data/postgres/results/dbt_seed_raw_countries.json @@ -0,0 +1,596 @@ +[ + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=raw_countries", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"JOB" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=raw_countries" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SEED" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.raw_countries", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"country_code", + "type":"text", + "description":null, + "fields":[ ] + }, + { + "name":"country_name", + "type":"text", + "description":null, + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"seed.jaffle_shop.raw_countries\"} */\n\n create table \"dbt\".\"{{ .* }}_openlineage_project\".\"raw_countries\" (\"country_name\" text,\"country_code\" text)\n " + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"seed.jaffle_shop.raw_countries\"} */\n\n create table \"dbt\".\"{{ .* }}_openlineage_project\".\"raw_countries\" (\"country_name\" text,\"country_code\" text)\n " + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries.sql#3", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"\n insert into \"dbt\".\"{{ .* }}_openlineage_project\".\"raw_countries\" (\"country_name\", \"country_code\") values\n (%s,%s),(%s,%s),(%s,%s),(%s,%s),(%s,%s),(%s,%s)\n ..." + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries.sql#3", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"\n insert into \"dbt\".\"{{ .* }}_openlineage_project\".\"raw_countries\" (\"country_name\", \"country_code\") values\n (%s,%s),(%s,%s),(%s,%s),(%s,%s),(%s,%s),(%s,%s)\n ..." + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries.sql#4", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"COMMIT" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries.sql#4", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"COMMIT" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=raw_countries" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"seed.jaffle_shop.raw_countries", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SEED" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.raw_countries", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"country_code", + "type":"text", + "description":null, + "fields":[ ] + }, + { + "name":"country_name", + "type":"text", + "description":null, + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=raw_countries", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"JOB" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + } +] diff --git a/tests/functional/openlineage/data/postgres/results/dbt_snapshot_orders.json b/tests/functional/openlineage/data/postgres/results/dbt_snapshot_orders.json new file mode 100644 index 00000000000..cae09025e02 --- /dev/null +++ b/tests/functional/openlineage/data/postgres/results/dbt_snapshot_orders.json @@ -0,0 +1,1382 @@ +[ + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders_snapshot", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"JOB" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SNAPSHOT" + } + } + }, + "eventType":"START", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.raw_orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/DocumentationDatasetFacet", + "description":"" + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders_snapshot.orders_snapshot", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"This is a unique identifier for a customer", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/DocumentationDatasetFacet", + "description":"snapshot view of orders table" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from \"dbt\".INFORMATION_SCHEMA.columns\n where table_name = 'orders_snapshot'\n \n and table_schema = 'snapshots'\n \n order by ordinal_position\n\n " + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from \"dbt\".INFORMATION_SCHEMA.columns\n where table_name = 'orders_snapshot'\n \n and table_schema = 'snapshots'\n \n order by ordinal_position\n\n " + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#3", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n \n \n \n\n create temporary table \"orders_snapshot__dbt_tmp{{ .* }}\"\n \n \n as\n \n (\n \n \n with snapshot_query as (\n\n \n\n \n\n select * from \"dbt\".\"{{ .* }}_openlineage_project\".\"raw_orders\"\n\n\n ),\n\n snapshotted_data as (\n\n select *, \n \n id as dbt_unique_key\n \n\n from \"dbt\".\"snapshots\".\"orders_snapshot\"\n where\n \n dbt_valid_to is null\n \n\n ),\n\n insertions_source_data as (\n\n select *, \n \n id as dbt_unique_key\n \n,\n order_date as dbt_updated_at,\n order_date as dbt_valid_from,\n \n \n coalesce(nullif(order_date, order_date), null)\n as dbt_valid_to\n,\n md5(coalesce(cast(id as varchar ), '')\n || '|' || coalesce(cast(order_date as varchar ), '')\n ) as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select *, \n \n id as dbt_unique_key\n \n,\n order_date as dbt_updated_at,\n order_date as dbt_valid_from,\n order_date as dbt_valid_to\n\n from snapshot_query\n ),\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n\n from insertions_source_data as source_data\n left outer join snapshotted_data\n on \n \n snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n \n\n where \n \n snapshotted_data.dbt_unique_key is null\n \n\n or (\n \n snapshotted_data.dbt_unique_key is not null\n \n and (\n (snapshotted_data.dbt_valid_from < source_data.order_date)\n )\n\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data\n on \n \n snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n \n\n where (\n (snapshotted_data.dbt_valid_from < source_data.order_date)\n )\n )\n\n select * from insertions\n union all\n select * from updates\n\n );\n \n " + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#3", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n \n \n \n\n create temporary table \"orders_snapshot__dbt_tmp{{ .* }}\"\n \n \n as\n \n (\n \n \n with snapshot_query as (\n\n \n\n \n\n select * from \"dbt\".\"{{ .* }}_openlineage_project\".\"raw_orders\"\n\n\n ),\n\n snapshotted_data as (\n\n select *, \n \n id as dbt_unique_key\n \n\n from \"dbt\".\"snapshots\".\"orders_snapshot\"\n where\n \n dbt_valid_to is null\n \n\n ),\n\n insertions_source_data as (\n\n select *, \n \n id as dbt_unique_key\n \n,\n order_date as dbt_updated_at,\n order_date as dbt_valid_from,\n \n \n coalesce(nullif(order_date, order_date), null)\n as dbt_valid_to\n,\n md5(coalesce(cast(id as varchar ), '')\n || '|' || coalesce(cast(order_date as varchar ), '')\n ) as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select *, \n \n id as dbt_unique_key\n \n,\n order_date as dbt_updated_at,\n order_date as dbt_valid_from,\n order_date as dbt_valid_to\n\n from snapshot_query\n ),\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n\n from insertions_source_data as source_data\n left outer join snapshotted_data\n on \n \n snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n \n\n where \n \n snapshotted_data.dbt_unique_key is null\n \n\n or (\n \n snapshotted_data.dbt_unique_key is not null\n \n and (\n (snapshotted_data.dbt_valid_from < source_data.order_date)\n )\n\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data\n on \n \n snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n \n\n where (\n (snapshotted_data.dbt_valid_from < source_data.order_date)\n )\n )\n\n select * from insertions\n union all\n select * from updates\n\n );\n \n " + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#4", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from INFORMATION_SCHEMA.columns\n where table_name = 'orders_snapshot__dbt_tmp{{ .* }}'\n \n order by ordinal_position\n\n " + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#4", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from INFORMATION_SCHEMA.columns\n where table_name = 'orders_snapshot__dbt_tmp{{ .* }}'\n \n order by ordinal_position\n\n " + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#5", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from \"dbt\".INFORMATION_SCHEMA.columns\n where table_name = 'orders_snapshot'\n \n and table_schema = 'snapshots'\n \n order by ordinal_position\n\n " + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#5", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from \"dbt\".INFORMATION_SCHEMA.columns\n where table_name = 'orders_snapshot'\n \n and table_schema = 'snapshots'\n \n order by ordinal_position\n\n " + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#6", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from INFORMATION_SCHEMA.columns\n where table_name = 'orders_snapshot__dbt_tmp{{ .* }}'\n \n order by ordinal_position\n\n " + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#6", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from INFORMATION_SCHEMA.columns\n where table_name = 'orders_snapshot__dbt_tmp{{ .* }}'\n \n order by ordinal_position\n\n " + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#7", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from \"dbt\".INFORMATION_SCHEMA.columns\n where table_name = 'orders_snapshot'\n \n and table_schema = 'snapshots'\n \n order by ordinal_position\n\n " + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#7", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from \"dbt\".INFORMATION_SCHEMA.columns\n where table_name = 'orders_snapshot'\n \n and table_schema = 'snapshots'\n \n order by ordinal_position\n\n " + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#8", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from INFORMATION_SCHEMA.columns\n where table_name = 'orders_snapshot__dbt_tmp{{ .* }}'\n \n order by ordinal_position\n\n " + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#8", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from INFORMATION_SCHEMA.columns\n where table_name = 'orders_snapshot__dbt_tmp{{ .* }}'\n \n order by ordinal_position\n\n " + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#9", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\nselect * from (\n \n \n with snapshot_query as (\n\n \n\n \n\n select * from \"dbt\".\"{{ .* }}_openlineage_project\".\"raw_orders\"\n\n\n ),\n\n snapshotted_data as (\n\n select *, \n \n id as dbt_unique_key\n \n\n from \"dbt\".\"snapshots\".\"orders_snapshot\"\n where\n \n dbt_valid_to is null\n \n\n ),\n\n insertions_source_data as (\n\n select *, \n \n id as dbt_unique_key\n \n,\n order_date as dbt_updated_at,\n order_date as dbt_valid_from,\n \n \n coalesce(nullif(order_date, order_date), null)\n as dbt_valid_to\n,\n md5(coalesce(cast(id as varchar ), '')\n || '|' || coalesce(cast(order_date as varchar ), '')\n ) as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select *, \n \n id as dbt_unique_key\n \n,\n order_date as dbt_updated_at,\n order_date as dbt_valid_from,\n order_date as dbt_valid_to\n\n from snapshot_query\n ),\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n\n from insertions_source_data as source_data\n left outer join snapshotted_data\n on \n \n snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n \n\n where \n \n snapshotted_data.dbt_unique_key is null\n \n\n or (\n \n snapshotted_data.dbt_unique_key is not null\n \n and (\n (snapshotted_data.dbt_valid_from < source_data.order_date)\n )\n\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data\n on \n \n snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n \n\n where (\n (snapshotted_data.dbt_valid_from < source_data.order_date)\n )\n )\n\n select * from insertions\n union all\n select * from updates\n\n ) as __dbt_sbq\n where false\n limit 0\n" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#9", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\nselect * from (\n \n \n with snapshot_query as (\n\n \n\n \n\n select * from \"dbt\".\"{{ .* }}_openlineage_project\".\"raw_orders\"\n\n\n ),\n\n snapshotted_data as (\n\n select *, \n \n id as dbt_unique_key\n \n\n from \"dbt\".\"snapshots\".\"orders_snapshot\"\n where\n \n dbt_valid_to is null\n \n\n ),\n\n insertions_source_data as (\n\n select *, \n \n id as dbt_unique_key\n \n,\n order_date as dbt_updated_at,\n order_date as dbt_valid_from,\n \n \n coalesce(nullif(order_date, order_date), null)\n as dbt_valid_to\n,\n md5(coalesce(cast(id as varchar ), '')\n || '|' || coalesce(cast(order_date as varchar ), '')\n ) as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select *, \n \n id as dbt_unique_key\n \n,\n order_date as dbt_updated_at,\n order_date as dbt_valid_from,\n order_date as dbt_valid_to\n\n from snapshot_query\n ),\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n\n from insertions_source_data as source_data\n left outer join snapshotted_data\n on \n \n snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n \n\n where \n \n snapshotted_data.dbt_unique_key is null\n \n\n or (\n \n snapshotted_data.dbt_unique_key is not null\n \n and (\n (snapshotted_data.dbt_valid_from < source_data.order_date)\n )\n\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data\n on \n \n snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n \n\n where (\n (snapshotted_data.dbt_valid_from < source_data.order_date)\n )\n )\n\n select * from insertions\n union all\n select * from updates\n\n ) as __dbt_sbq\n where false\n limit 0\n" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#10", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\nselect * from (\n select now()::timestamp without time zone as dbt_snapshot_time\n ) as __dbt_sbq\n where false\n limit 0\n" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#10", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\nselect * from (\n select now()::timestamp without time zone as dbt_snapshot_time\n ) as __dbt_sbq\n where false\n limit 0\n" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#11", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n update \"dbt\".\"snapshots\".\"orders_snapshot\"\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n from \"orders_snapshot__dbt_tmp{{ .* }}\" as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_scd_id::text = \"dbt\".\"snapshots\".\"orders_snapshot\".dbt_scd_id::text\n and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)\n \n and \"dbt\".\"snapshots\".\"orders_snapshot\".dbt_valid_to is null;\n \n\n\n insert into \"dbt\".\"snapshots\".\"orders_snapshot\" (\"id\", \"user_id\", \"order_date\", \"status\", \"dbt_updated_at\", \"dbt_valid_from\", \"dbt_valid_to\", \"dbt_scd_id\")\n select DBT_INTERNAL_SOURCE.\"id\",DBT_INTERNAL_SOURCE.\"user_id\",DBT_INTERNAL_SOURCE.\"order_date\",DBT_INTERNAL_SOURCE.\"status\",DBT_INTERNAL_SOURCE.\"dbt_updated_at\",DBT_INTERNAL_SOURCE.\"dbt_valid_from\",DBT_INTERNAL_SOURCE.\"dbt_valid_to\",DBT_INTERNAL_SOURCE.\"dbt_scd_id\"\n from \"orders_snapshot__dbt_tmp{{ .* }}\" as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_change_type::text = 'insert'::text;\n\n " + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#11", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot\"} */\n\n update \"dbt\".\"snapshots\".\"orders_snapshot\"\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n from \"orders_snapshot__dbt_tmp{{ .* }}\" as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_scd_id::text = \"dbt\".\"snapshots\".\"orders_snapshot\".dbt_scd_id::text\n and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)\n \n and \"dbt\".\"snapshots\".\"orders_snapshot\".dbt_valid_to is null;\n \n\n\n insert into \"dbt\".\"snapshots\".\"orders_snapshot\" (\"id\", \"user_id\", \"order_date\", \"status\", \"dbt_updated_at\", \"dbt_valid_from\", \"dbt_valid_to\", \"dbt_scd_id\")\n select DBT_INTERNAL_SOURCE.\"id\",DBT_INTERNAL_SOURCE.\"user_id\",DBT_INTERNAL_SOURCE.\"order_date\",DBT_INTERNAL_SOURCE.\"status\",DBT_INTERNAL_SOURCE.\"dbt_updated_at\",DBT_INTERNAL_SOURCE.\"dbt_valid_from\",DBT_INTERNAL_SOURCE.\"dbt_valid_to\",DBT_INTERNAL_SOURCE.\"dbt_scd_id\"\n from \"orders_snapshot__dbt_tmp{{ .* }}\" as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_change_type::text = 'insert'::text;\n\n " + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#12", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"COMMIT" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot.sql#12", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SQLJobFacet", + "query":"COMMIT" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders_snapshot" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"snapshot.jaffle_shop.orders_snapshot", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SNAPSHOT" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.raw_orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/DocumentationDatasetFacet", + "description":"" + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders_snapshot.orders_snapshot", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"This is a unique identifier for a customer", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/DocumentationDatasetFacet", + "description":"snapshot view of orders table" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders_snapshot", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/{{ .* }}/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"JOB" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + } +] diff --git a/tests/functional/openlineage/data/postgres/results/dbt_snapshot_orders_snapshot_with_syntax_error.json b/tests/functional/openlineage/data/postgres/results/dbt_snapshot_orders_snapshot_with_syntax_error.json new file mode 100644 index 00000000000..c7c9cb70bf4 --- /dev/null +++ b/tests/functional/openlineage/data/postgres/results/dbt_snapshot_orders_snapshot_with_syntax_error.json @@ -0,0 +1,375 @@ +[ + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders_snapshot_with_syntax_error", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "JOB" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders_snapshot_with_syntax_error" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "snapshot.jaffle_shop.orders_snapshot_with_syntax_error_sql", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SNAPSHOT" + } + } + }, + "eventType": "START", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.raw_orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders_snapshot_with_syntax_error.orders_snapshot_with_syntax_error_sql", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "snapshot.jaffle_shop.orders_snapshot_with_syntax_error_sql" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "snapshot.jaffle_shop.orders_snapshot_with_syntax_error_sql.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot_with_syntax_error_sql\"} */\nselect * from (\n \n \n\n select *,\n md5(coalesce(cast(id as varchar ), '')\n || '|' || coalesce(cast(order_date as varchar ), '')\n ) as dbt_scd_id,\n order_date as dbt_updated_at,\n order_date as dbt_valid_from,\n \n \n coalesce(nullif(order_date, order_date), null)\n as dbt_valid_to\nfrom (\n \n\n\n\nSELECT * FROM \"dbt\".\"{{ .* }}_openlineage_project\".\"raw_orders\"\n\nSQL Syntax Error here\n\n ) sbq\n\n\n\n ) as __dbt_sbq\n where false\n limit 0\n" + } + } + }, + "eventType": "START", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "snapshot.jaffle_shop.orders_snapshot_with_syntax_error_sql" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + }, + "errorMessage": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ErrorMessageRunFacet.json#/$defs/ErrorMessageRunFacet", + "message": "Database Error in snapshot orders_snapshot_with_syntax_error_sql (snapshots/orders_snapshot_with_syntax_error.sql)\n syntax error at or near \"Syntax\"\n LINE 23: SQL Syntax Error here\n ^", + "programmingLanguage": "sql", + "stackTrace": "Traceback (most recent call last):{{ .* }}" + } + } + }, + "job": { + "namespace": "dbt", + "name": "snapshot.jaffle_shop.orders_snapshot_with_syntax_error_sql.sql#1", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SQL" + }, + "sql": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + + "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"snapshot.jaffle_shop.orders_snapshot_with_syntax_error_sql\"} */\nselect * from (\n \n \n\n select *,\n md5(coalesce(cast(id as varchar ), '')\n || '|' || coalesce(cast(order_date as varchar ), '')\n ) as dbt_scd_id,\n order_date as dbt_updated_at,\n order_date as dbt_valid_from,\n \n \n coalesce(nullif(order_date, order_date), null)\n as dbt_valid_to\nfrom (\n \n\n\n\nSELECT * FROM \"dbt\".\"{{ .* }}_openlineage_project\".\"raw_orders\"\n\nSQL Syntax Error here\n\n ) sbq\n\n\n\n ) as __dbt_sbq\n where false\n limit 0\n" + } + } + }, + "eventType": "FAIL", + "inputs": [], + "outputs": [] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "parent": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run": { + "runId": "{{ .* }}" + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders_snapshot_with_syntax_error" + } + }, + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + }, + "errorMessage": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ErrorMessageRunFacet.json#/$defs/ErrorMessageRunFacet", + "message": "Database Error in snapshot orders_snapshot_with_syntax_error_sql (snapshots/orders_snapshot_with_syntax_error.sql)\n syntax error at or near \"Syntax\"\n LINE 23: SQL Syntax Error here\n ^", + "programmingLanguage": "sql", + "stackTrace": null + } + } + }, + "job": { + "namespace": "dbt", + "name": "snapshot.jaffle_shop.orders_snapshot_with_syntax_error_sql", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "SNAPSHOT" + } + } + }, + "eventType": "FAIL", + "inputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.raw_orders", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ], + "outputs": [ + { + "namespace": "postgres://localhost:5432", + "name": "jaffle_shop.orders_snapshot_with_syntax_error.orders_snapshot_with_syntax_error_sql", + "facets": { + "dataSource": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + + "name": "postgres://localhost:5432", + "uri": "postgres://localhost:5432" + }, + "schema": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + + "fields": [] + }, + "documentation": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + + "description": "" + } + } + } + ] + }, + { + "eventTime": "{{ .* }}", + "producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL": "https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run": { + "runId": "{{ .* }}", + "facets": { + "dbt_version": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version": "{{ .* }}" + }, + "errorMessage": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/ErrorMessageRunFacet.json#/$defs/ErrorMessageRunFacet", + "message": "Command `cli snapshot` failed at {{ .* }}", + "programmingLanguage": "sql", + "stackTrace": null + } + } + }, + "job": { + "namespace": "dbt", + "name": "dbt-run--project=jaffle_shop--profile=test--select=orders_snapshot_with_syntax_error", + "facets": { + "jobType": { + "_producer": "https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL": "https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + + "processingType": "BATCH", + "integration": "DBT", + "jobType": "JOB" + } + } + }, + "eventType": "FAIL", + "inputs": [], + "outputs": [] + } +] diff --git a/tests/functional/openlineage/data/postgres/results/dbt_test_orders.json b/tests/functional/openlineage/data/postgres/results/dbt_test_orders.json new file mode 100644 index 00000000000..7f041496e27 --- /dev/null +++ b/tests/functional/openlineage/data/postgres/results/dbt_test_orders.json @@ -0,0 +1,4272 @@ +[ + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"JOB" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"START", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"This is a unique identifier for an order", + "fields":[ ] + }, + { + "name":"customer_id", + "type":"integer", + "description":"Foreign key to the customers table", + "fields":[ ] + }, + { + "name":"order_date", + "type":"date", + "description":"Date (UTC) that the order was placed", + "fields":[ ] + }, + { + "name":"status", + "type":"string", + "description":"Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields":[ ] + }, + { + "name":"amount", + "type":"float", + "description":"Total amount (AUD) of the order", + "fields":[ ] + }, + { + "name":"credit_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by credit card", + "fields":[ ] + }, + { + "name":"coupon_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by coupon", + "fields":[ ] + }, + { + "name":"bank_transfer_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by bank transfer", + "fields":[ ] + }, + { + "name":"gift_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by gift card", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\nwith all_values as (\n\n select\n status as value_field,\n count(*) as n_records\n\n from \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\n group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n 'placed','shipped','completed','return_pending','returned'\n)\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\nwith all_values as (\n\n select\n status as value_field,\n count(*) as n_records\n\n from \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\n group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n 'placed','shipped','completed','return_pending','returned'\n)\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataQualityAssertions":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions":[ + { + "assertion":"accepted_values", + "success":true, + "column": "status" + } + ] + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_amount.106140f9fd", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"START", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"This is a unique identifier for an order", + "fields":[ ] + }, + { + "name":"customer_id", + "type":"integer", + "description":"Foreign key to the customers table", + "fields":[ ] + }, + { + "name":"order_date", + "type":"date", + "description":"Date (UTC) that the order was placed", + "fields":[ ] + }, + { + "name":"status", + "type":"string", + "description":"Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields":[ ] + }, + { + "name":"amount", + "type":"float", + "description":"Total amount (AUD) of the order", + "fields":[ ] + }, + { + "name":"credit_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by credit card", + "fields":[ ] + }, + { + "name":"coupon_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by coupon", + "fields":[ ] + }, + { + "name":"bank_transfer_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by bank transfer", + "fields":[ ] + }, + { + "name":"gift_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by gift card", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.not_null_orders_amount", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_amount.106140f9fd" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_amount.106140f9fd.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_amount.106140f9fd" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_amount.106140f9fd.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_amount.106140f9fd" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_amount.106140f9fd.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_amount.106140f9fd\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_amount.106140f9fd" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_amount.106140f9fd.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_amount.106140f9fd\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_amount.106140f9fd", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataQualityAssertions":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions":[ + { + "assertion":"not_null", + "success":true, + "column": "amount" + } + ] + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.not_null_orders_amount", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"START", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"This is a unique identifier for an order", + "fields":[ ] + }, + { + "name":"customer_id", + "type":"integer", + "description":"Foreign key to the customers table", + "fields":[ ] + }, + { + "name":"order_date", + "type":"date", + "description":"Date (UTC) that the order was placed", + "fields":[ ] + }, + { + "name":"status", + "type":"string", + "description":"Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields":[ ] + }, + { + "name":"amount", + "type":"float", + "description":"Total amount (AUD) of the order", + "fields":[ ] + }, + { + "name":"credit_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by credit card", + "fields":[ ] + }, + { + "name":"coupon_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by coupon", + "fields":[ ] + }, + { + "name":"bank_transfer_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by bank transfer", + "fields":[ ] + }, + { + "name":"gift_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by gift card", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.not_null_orders_bank_transfer_amount", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect bank_transfer_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere bank_transfer_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect bank_transfer_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere bank_transfer_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataQualityAssertions":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions":[ + { + "assertion":"not_null", + "success":true, + "column": "bank_transfer_amount" + } + ] + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.not_null_orders_bank_transfer_amount", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"START", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"This is a unique identifier for an order", + "fields":[ ] + }, + { + "name":"customer_id", + "type":"integer", + "description":"Foreign key to the customers table", + "fields":[ ] + }, + { + "name":"order_date", + "type":"date", + "description":"Date (UTC) that the order was placed", + "fields":[ ] + }, + { + "name":"status", + "type":"string", + "description":"Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields":[ ] + }, + { + "name":"amount", + "type":"float", + "description":"Total amount (AUD) of the order", + "fields":[ ] + }, + { + "name":"credit_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by credit card", + "fields":[ ] + }, + { + "name":"coupon_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by coupon", + "fields":[ ] + }, + { + "name":"bank_transfer_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by bank transfer", + "fields":[ ] + }, + { + "name":"gift_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by gift card", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.not_null_orders_coupon_amount", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect coupon_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere coupon_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect coupon_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere coupon_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataQualityAssertions":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions":[ + { + "assertion":"not_null", + "success":true, + "column": "coupon_amount" + } + ] + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.not_null_orders_coupon_amount", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"START", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"This is a unique identifier for an order", + "fields":[ ] + }, + { + "name":"customer_id", + "type":"integer", + "description":"Foreign key to the customers table", + "fields":[ ] + }, + { + "name":"order_date", + "type":"date", + "description":"Date (UTC) that the order was placed", + "fields":[ ] + }, + { + "name":"status", + "type":"string", + "description":"Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields":[ ] + }, + { + "name":"amount", + "type":"float", + "description":"Total amount (AUD) of the order", + "fields":[ ] + }, + { + "name":"credit_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by credit card", + "fields":[ ] + }, + { + "name":"coupon_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by coupon", + "fields":[ ] + }, + { + "name":"bank_transfer_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by bank transfer", + "fields":[ ] + }, + { + "name":"gift_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by gift card", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.not_null_orders_credit_card_amount", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect credit_card_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere credit_card_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect credit_card_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere credit_card_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataQualityAssertions":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions":[ + { + "assertion":"not_null", + "success":true, + "column": "credit_card_amount" + + } + ] + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.not_null_orders_credit_card_amount", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_customer_id.c5f02694af", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"START", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"This is a unique identifier for an order", + "fields":[ ] + }, + { + "name":"customer_id", + "type":"integer", + "description":"Foreign key to the customers table", + "fields":[ ] + }, + { + "name":"order_date", + "type":"date", + "description":"Date (UTC) that the order was placed", + "fields":[ ] + }, + { + "name":"status", + "type":"string", + "description":"Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields":[ ] + }, + { + "name":"amount", + "type":"float", + "description":"Total amount (AUD) of the order", + "fields":[ ] + }, + { + "name":"credit_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by credit card", + "fields":[ ] + }, + { + "name":"coupon_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by coupon", + "fields":[ ] + }, + { + "name":"bank_transfer_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by bank transfer", + "fields":[ ] + }, + { + "name":"gift_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by gift card", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.not_null_orders_customer_id", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_customer_id.c5f02694af" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_customer_id.c5f02694af.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_customer_id.c5f02694af" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_customer_id.c5f02694af.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_customer_id.c5f02694af" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_customer_id.c5f02694af.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_customer_id.c5f02694af\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect customer_id\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere customer_id is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_customer_id.c5f02694af" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_customer_id.c5f02694af.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_customer_id.c5f02694af\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect customer_id\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere customer_id is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_customer_id.c5f02694af", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataQualityAssertions":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions":[ + { + "assertion":"not_null", + "success":true, + "column": "customer_id" + + } + ] + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.not_null_orders_customer_id", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"START", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"This is a unique identifier for an order", + "fields":[ ] + }, + { + "name":"customer_id", + "type":"integer", + "description":"Foreign key to the customers table", + "fields":[ ] + }, + { + "name":"order_date", + "type":"date", + "description":"Date (UTC) that the order was placed", + "fields":[ ] + }, + { + "name":"status", + "type":"string", + "description":"Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields":[ ] + }, + { + "name":"amount", + "type":"float", + "description":"Total amount (AUD) of the order", + "fields":[ ] + }, + { + "name":"credit_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by credit card", + "fields":[ ] + }, + { + "name":"coupon_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by coupon", + "fields":[ ] + }, + { + "name":"bank_transfer_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by bank transfer", + "fields":[ ] + }, + { + "name":"gift_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by gift card", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.not_null_orders_gift_card_amount", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect gift_card_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere gift_card_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect gift_card_amount\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere gift_card_amount is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataQualityAssertions":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions":[ + { + "assertion":"not_null", + "success":true, + "column": "gift_card_amount" + } + ] + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.not_null_orders_gift_card_amount", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_order_id.cf6c17daed", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"START", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"This is a unique identifier for an order", + "fields":[ ] + }, + { + "name":"customer_id", + "type":"integer", + "description":"Foreign key to the customers table", + "fields":[ ] + }, + { + "name":"order_date", + "type":"date", + "description":"Date (UTC) that the order was placed", + "fields":[ ] + }, + { + "name":"status", + "type":"string", + "description":"Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields":[ ] + }, + { + "name":"amount", + "type":"float", + "description":"Total amount (AUD) of the order", + "fields":[ ] + }, + { + "name":"credit_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by credit card", + "fields":[ ] + }, + { + "name":"coupon_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by coupon", + "fields":[ ] + }, + { + "name":"bank_transfer_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by bank transfer", + "fields":[ ] + }, + { + "name":"gift_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by gift card", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.not_null_orders_order_id", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_order_id.cf6c17daed" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_order_id.cf6c17daed.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_order_id.cf6c17daed" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_order_id.cf6c17daed.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_order_id.cf6c17daed" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_order_id.cf6c17daed.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_order_id.cf6c17daed\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect order_id\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere order_id is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_order_id.cf6c17daed" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_order_id.cf6c17daed.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.not_null_orders_order_id.cf6c17daed\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\n\n\nselect order_id\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere order_id is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.not_null_orders_order_id.cf6c17daed", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataQualityAssertions":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions":[ + { + "assertion":"not_null", + "success":true, + "column": "order_id" + } + ] + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.not_null_orders_order_id", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"START", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.customers", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"customer_id", + "type":"integer", + "description":"This is a unique identifier for a customer", + "fields":[ ] + }, + { + "name":"first_name", + "type":"string", + "description":"Customer's first name. PII.", + "fields":[ ] + }, + { + "name":"last_name", + "type":"string", + "description":"Customer's last name. PII.", + "fields":[ ] + }, + { + "name":"first_order", + "type":"date", + "description":"Date (UTC) of a customer's first order", + "fields":[ ] + }, + { + "name":"most_recent_order", + "type":"date", + "description":"Date (UTC) of a customer's most recent order", + "fields":[ ] + }, + { + "name":"number_of_orders", + "type":"integer", + "description":"Count of the number of orders a customer has placed", + "fields":[ ] + }, + { + "name":"total_order_amount", + "type":"float", + "description":"Total value (AUD) of a customer's orders", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"This table has basic information about a customer, as well as some derived facts based on a customer's orders" + } + } + }, + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"This is a unique identifier for an order", + "fields":[ ] + }, + { + "name":"customer_id", + "type":"integer", + "description":"Foreign key to the customers table", + "fields":[ ] + }, + { + "name":"order_date", + "type":"date", + "description":"Date (UTC) that the order was placed", + "fields":[ ] + }, + { + "name":"status", + "type":"string", + "description":"Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields":[ ] + }, + { + "name":"amount", + "type":"float", + "description":"Total amount (AUD) of the order", + "fields":[ ] + }, + { + "name":"credit_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by credit card", + "fields":[ ] + }, + { + "name":"coupon_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by coupon", + "fields":[ ] + }, + { + "name":"bank_transfer_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by bank transfer", + "fields":[ ] + }, + { + "name":"gift_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by gift card", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\nwith child as (\n select customer_id as from_field\n from \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\n where customer_id is not null\n),\n\nparent as (\n select customer_id as to_field\n from \"dbt\".\"{{ .* }}_openlineage_project\".\"customers\"\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\nwith child as (\n select customer_id as from_field\n from \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\n where customer_id is not null\n),\n\nparent as (\n select customer_id as to_field\n from \"dbt\".\"{{ .* }}_openlineage_project\".\"customers\"\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_.c6ec7f58f2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataQualityAssertions":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions":[ + { + "assertion":"relationships", + "success":true, + "column": "customer_id" + + } + ] + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.relationships_orders_customer_id__customer_id__ref_customers_", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.unique_orders_order_id.fed79b3a6e", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"START", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ + { + "name":"order_id", + "type":"integer", + "description":"This is a unique identifier for an order", + "fields":[ ] + }, + { + "name":"customer_id", + "type":"integer", + "description":"Foreign key to the customers table", + "fields":[ ] + }, + { + "name":"order_date", + "type":"date", + "description":"Date (UTC) that the order was placed", + "fields":[ ] + }, + { + "name":"status", + "type":"string", + "description":"Orders can be one of the following statuses:\n\n| status | description |\n|----------------|------------------------------------------------------------------------------------------------------------------------|\n| placed | The order has been placed but has not yet left the warehouse |\n| shipped | The order has ben shipped to the customer and is currently in transit |\n| completed | The order has been received by the customer |\n| return_pending | The customer has indicated that they would like to return the order, but it has not yet been received at the warehouse |\n| returned | The order has been returned by the customer and received at the warehouse |", + "fields":[ ] + }, + { + "name":"amount", + "type":"float", + "description":"Total amount (AUD) of the order", + "fields":[ ] + }, + { + "name":"credit_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by credit card", + "fields":[ ] + }, + { + "name":"coupon_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by coupon", + "fields":[ ] + }, + { + "name":"bank_transfer_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by bank transfer", + "fields":[ ] + }, + { + "name":"gift_card_amount", + "type":"float", + "description":"Amount of the order (AUD) paid for by gift card", + "fields":[ ] + } + ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"This table has basic information about orders, as well as some derived facts based on payments" + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.unique_orders_order_id", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.unique_orders_order_id.fed79b3a6e" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.unique_orders_order_id.fed79b3a6e.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.unique_orders_order_id.fed79b3a6e" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.unique_orders_order_id.fed79b3a6e.sql#1", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"BEGIN" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.unique_orders_order_id.fed79b3a6e" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.unique_orders_order_id.fed79b3a6e.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.unique_orders_order_id.fed79b3a6e\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\nselect\n order_id as unique_field,\n count(*) as n_records\n\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere order_id is not null\ngroup by order_id\nhaving count(*) > 1\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"START", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.unique_orders_order_id.fed79b3a6e" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.unique_orders_order_id.fed79b3a6e.sql#2", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"SQL" + }, + "sql":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SQLJobFacet.json#/$defs/SQLJobFacet", + "query":"/* {\"app\": \"dbt\", \"dbt_version\": \"{{ .* }}\", \"profile_name\": \"test\", \"target_name\": \"default\", \"node_id\": \"test.jaffle_shop.unique_orders_order_id.fed79b3a6e\"} */\n\n select\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n \n \n\nselect\n order_id as unique_field,\n count(*) as n_records\n\nfrom \"dbt\".\"{{ .* }}_openlineage_project\".\"orders\"\nwhere order_id is not null\ngroup by order_id\nhaving count(*) > 1\n\n\n\n \n \n \n ) dbt_internal_test" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "parent":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/ParentRunFacet.json#/$defs/ParentRunFacet", + "run":{ + "runId":"{{ .* }}" + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders" + } + }, + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"test.jaffle_shop.unique_orders_order_id.fed79b3a6e", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"TEST" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.orders", + "facets":{ + "dataQualityAssertions":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DataQualityAssertionsDatasetFacet.json#/$defs/DataQualityAssertionsDatasetFacet", + "assertions":[ + { + "assertion":"unique", + "success":true, + "column": "order_id" + } + ] + } + } + } + ], + "outputs":[ + { + "namespace":"postgres://localhost:5432", + "name":"jaffle_shop.unique_orders_order_id", + "facets":{ + "dataSource":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DatasourceDatasetFacet.json#/$defs/DatasourceDatasetFacet", + "name":"postgres://localhost:5432", + "uri":"postgres://localhost:5432" + }, + "schema":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet", + "fields":[ ] + }, + "documentation":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/DocumentationDatasetFacet.json#/$defs/DocumentationDatasetFacet", + "description":"" + } + } + } + ] + }, + { + "eventTime":"{{ .* }}", + "producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "schemaURL":"https://openlineage.io/spec/{{ .* }}/OpenLineage.json#/$defs/RunEvent", + "run":{ + "runId":"{{ .* }}", + "facets":{ + "dbt_version":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/client/python", + "_schemaURL":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/dbt-version-run-facet.json", + "version":"{{ .* }}" + } + } + }, + "job":{ + "namespace":"dbt", + "name":"dbt-run--project=jaffle_shop--profile=test--select=orders", + "facets":{ + "jobType":{ + "_producer":"https://github.com/OpenLineage/OpenLineage/tree/{{ .* }}/integration/dbt", + "_schemaURL":"https://openlineage.io/spec/facets/{{ .* }}/JobTypeJobFacet.json#/$defs/JobTypeJobFacet", + "processingType":"BATCH", + "integration":"DBT", + "jobType":"JOB" + } + } + }, + "eventType":"COMPLETE", + "inputs":[ ], + "outputs":[ ] + } +] diff --git a/tests/functional/openlineage/fixtures.py b/tests/functional/openlineage/fixtures.py new file mode 100644 index 00000000000..a9b0e7e9885 --- /dev/null +++ b/tests/functional/openlineage/fixtures.py @@ -0,0 +1,349 @@ +import os + +import pytest + +from dbt.tests.util import run_dbt +from tests.fixtures.jaffle_shop import ( + JaffleShopProject, + customers_sql, + docs_md, + get_jaffle_shop_seeds, + orders_sql, + overview_md, + staging_stg_customers_sql, + staging_stg_orders_sql, + staging_stg_payments_sql, +) + +# snapshots/orders_snapshot.sql +snapshot_orders_snapshot = """ +{% snapshot orders_snapshot %} + + {{ + config( + target_schema='snapshots', + strategy='timestamp', + unique_key='id', + updated_at='order_date', + ) + }} + + select * from {{ ref('raw_orders') }} + +{% endsnapshot %} +""" + +# snapshots/schema.yml +snapshot_yml = """ +version: 2 +snapshots: + - name: orders_snapshot + description: snapshot view of orders table + columns: + - name: order_id + description: This is a unique identifier for a customer + data_type: integer + + - name: orders_snapshot_with_syntax_error + description: dummy snapshot view of orders table that has a syntax error + columns: + - name: order_id + description: This is a unique identifier for a customer + data_type: integer + +""" + +# models/staging/schema.yml +staging_schema_yml = """ +version: 2 + +models: + - name: stg_customers + columns: + - name: customer_id + data_type: integer + data_tests: + - unique + - not_null + + - name: stg_orders + columns: + - name: order_id + data_type: integer + type: integer + dataType: integer + data_tests: + - unique + - not_null + - name: status + data_type: string + data_tests: + - accepted_values: + values: ['placed', 'shipped', 'completed', 'return_pending', 'returned'] + + - name: stg_payments + columns: + - name: payment_id + data_type: integer + data_tests: + - unique + - not_null + - name: payment_method + data_type: string + data_tests: + - accepted_values: + values: ['credit_card', 'coupon', 'bank_transfer', 'gift_card'] +""" + +# schema.yml +schema_yml = """ +version: 2 + +models: + - name: customers + description: This table has basic information about a customer, as well as some derived facts based on a customer's orders + + columns: + - name: customer_id + data_type: integer + description: This is a unique identifier for a customer + data_tests: + - unique + - not_null + + - name: first_name + data_type: string + description: Customer's first name. PII. + + - name: last_name + data_type: string + description: Customer's last name. PII. + + - name: first_order + data_type: date + description: Date (UTC) of a customer's first order + + - name: most_recent_order + data_type: date + description: Date (UTC) of a customer's most recent order + + - name: number_of_orders + data_type: integer + description: Count of the number of orders a customer has placed + + - name: total_order_amount + data_type: float + description: Total value (AUD) of a customer's orders + + - name: orders + description: This table has basic information about orders, as well as some derived facts based on payments + + columns: + - name: order_id + data_type: integer + data_tests: + - unique + - not_null + description: This is a unique identifier for an order + + - name: customer_id + data_type: integer + description: Foreign key to the customers table + data_tests: + - not_null + - relationships: + to: ref('customers') + field: customer_id + + - name: order_date + data_type: date + description: Date (UTC) that the order was placed + + - name: status + data_type: string + description: '{{ doc("orders_status") }}' + data_tests: + - accepted_values: + values: ['placed', 'shipped', 'completed', 'return_pending', 'returned'] + + - name: amount + data_type: float + description: Total amount (AUD) of the order + data_tests: + - not_null + + - name: credit_card_amount + data_type: float + description: Amount of the order (AUD) paid for by credit card + data_tests: + - not_null + + - name: coupon_amount + data_type: float + description: Amount of the order (AUD) paid for by coupon + data_tests: + - not_null + + - name: bank_transfer_amount + data_type: float + description: Amount of the order (AUD) paid for by bank transfer + data_tests: + - not_null + + - name: gift_card_amount + data_type: float + description: Amount of the order (AUD) paid for by gift card + data_tests: + - not_null + + - name: orders_with_syntax_error + description: dummy model that has SQL syntax error + columns: + - name: order_id + data_type: integer + data_tests: + - unique + - not_null + description: This is a unique identifier for an order + + - name: orders_with_failed_test + description: dummy model that has failed test + columns: + - name: order_id + data_type: integer + data_tests: + - accepted_values: + values: [99] +""" + +# models/orders_with_syntax_error.sql +orders_with_syntax_error_sql = """ +{% set payment_methods = ['credit_card', 'coupon', 'bank_transfer', 'gift_card'] %} + +with orders as ( + + select * from {{ ref('stg_orders') }} + +), + +SELECT order_id, +FROM orders + +SQL Syntax Error here +""" + +# snapshots/orders_snapshot_with_syntax_error.sql +snapshot_orders_with_syntax_error_sql = """ +{% snapshot orders_snapshot_with_syntax_error_sql %} + +{{ + config( + target_schema='snapshots', + strategy='timestamp', + unique_key='id', + updated_at='order_date', + ) +}} + +SELECT * FROM {{ ref('raw_orders') }} + +SQL Syntax Error here + +{% endsnapshot %} +""" + +# selectors.yml +selectors_yml = """ + +selectors: + - name: jaffle_shop_models + description: "selects the successful models of jaffle shop" + definition: + union: + - +customers + - +orders +""" + +# seeds/raw_countries.csv +raw_countries_csv = """ +country_name,country_code +Algeria,DZ +China, CN +France,FR +Mexico,MX +Poland,PL +United States,US +""".strip() + +# seeds/seeds.yml +seeds_yml = """ +version: 2 + +seeds: + - name: raw_countries + config: + column_types: + country_code: text + country_name: text +""" + + +class OpenLineageJaffleShopProject(JaffleShopProject): + + @pytest.fixture(scope="class") + def build_jaffle_shop_project(self, project): + """ + Build the jaffle shop project + """ + run_dbt(["build", "--selector", "jaffle_shop_models"]) + + @pytest.fixture(scope="class") + def models(self): + return { + "customers.sql": customers_sql, + "docs.md": docs_md, + "orders.sql": orders_sql, + "overview.md": overview_md, + "schema.yml": schema_yml, + "staging": { + "schema.yml": staging_schema_yml, + "stg_customers.sql": staging_stg_customers_sql, + "stg_orders.sql": staging_stg_orders_sql, + "stg_payments.sql": staging_stg_payments_sql, + }, + # resources expected to fail + "orders_with_syntax_error.sql": orders_with_syntax_error_sql, + "orders_with_failed_test.sql": orders_sql, + } + + @pytest.fixture(scope="class") + def selectors(self): + return selectors_yml + + @pytest.fixture(scope="class") + def dbt_profile_target(self): + return { + "type": "postgres", + "threads": 1, + "host": "localhost", + "port": int(os.getenv("POSTGRES_TEST_PORT", 5432)), + "user": os.getenv("POSTGRES_TEST_USER", "root"), + "pass": os.getenv("POSTGRES_TEST_PASS", "password"), + "dbname": os.getenv("POSTGRES_TEST_DATABASE", "dbt"), + } + + @pytest.fixture(scope="class") + def snapshots(self): + return { + "orders_snapshot.sql": snapshot_orders_snapshot, + "snapshots.yml": snapshot_yml, + # resources expected to fail + "orders_snapshot_with_syntax_error.sql": snapshot_orders_with_syntax_error_sql, + } + + @pytest.fixture(scope="class") + def seeds(self): + jaffle_shop_seeds = get_jaffle_shop_seeds() + jaffle_shop_seeds["raw_countries.csv"] = raw_countries_csv + jaffle_shop_seeds["seeds.yml"] = seeds_yml + return jaffle_shop_seeds diff --git a/tests/functional/openlineage/openlineage_project.py b/tests/functional/openlineage/openlineage_project.py new file mode 100644 index 00000000000..89bab9b5094 --- /dev/null +++ b/tests/functional/openlineage/openlineage_project.py @@ -0,0 +1,99 @@ +import json +import os +from unittest.mock import Mock + +import pytest + +from dbt.tests.util import run_dbt +from tests.functional.openlineage.fixtures import OpenLineageJaffleShopProject +from tests.openlineage_utils import assert_ol_events_match, ol_event_to_dict + + +class TestOpenLineage(OpenLineageJaffleShopProject): + @pytest.mark.parametrize( + "dbt_command, expected_ol_events_path, expect_pass", + [ + (["run", "-s", "orders"], "./data/postgres/results/dbt_run_orders.json", True), + (["test", "-s", "orders"], "./data/postgres/results/dbt_test_orders.json", True), + ( + ["snapshot", "-s", "orders_snapshot"], + "./data/postgres/results/dbt_snapshot_orders.json", + True, + ), + (["build", "-s", "orders"], "./data/postgres/results/dbt_build_orders.json", True), + # model has SQL syntax error + ( + ["run", "-s", "orders_with_syntax_error"], + "./data/postgres/results/dbt_run_orders_with_syntax_error.json", + False, + ), + # data test fails + ( + ["build", "-s", "orders_with_failed_test"], + "./data/postgres/results/dbt_build_orders_with_failed_test.json", + False, + ), + # snapshot has SQL syntax error + ( + ["snapshot", "-s", "orders_snapshot_with_syntax_error"], + "./data/postgres/results/dbt_snapshot_orders_snapshot_with_syntax_error.json", + False, + ), + ( + ["seed", "-s", "raw_countries"], + "./data/postgres/results/dbt_seed_raw_countries.json", + True, + ), + ], + ids=[ + "dbt_run_orders", + "dbt_test_orders", + "dbt_snapshot_orders", + "dbt_build_orders", + "dbt_run_orders_with_syntax_error", + "dbt_build_orders_with_failed_test", + "dbt_snapshot_orders_snapshot_with_syntax_error", + "dbt_seed_raw_countries", + ], + ) + def test_openlineage_events( + self, + dbt_command, + expected_ol_events_path, + expect_pass, + build_jaffle_shop_project, + openlineage_handler_with_dummy_emit, + openlineage_handler_with_raise_exception, + ): + + def get_expected_ol_events(expected_ol_events_path): + jsonl_file_path = os.path.join(os.path.dirname(__file__), expected_ol_events_path) + return json.loads(open(jsonl_file_path, "r").read()) + + run_dbt(dbt_command, expect_pass=expect_pass) + + expected_ol_events = get_expected_ol_events(expected_ol_events_path) + actual_ol_events = [ + ol_event_to_dict(e) + for e in openlineage_handler_with_dummy_emit.emitted_events + if e is not None + ] + + assert_ol_events_match(expected_event=expected_ol_events, actual_event=actual_ol_events) + + def test_openlineage_doesnt_make_dbt_fail(self, build_jaffle_shop_project, monkeypatch): + def raise_exception(*args, **kwargs): + raise Exception("Fake exception raised in OpenLineage") + + dummy_handle_exception = Mock() + monkeypatch.setattr( + "dbt.openlineage.handler.OpenLineageHandler.handle_unsafe", raise_exception + ) + monkeypatch.setattr( + "dbt.openlineage.handler.OpenLineageHandler._handle_exception", dummy_handle_exception + ) + + dbt_command = ["run", "-s", "orders"] + run_dbt(dbt_command, expect_pass=True) + + assert dummy_handle_exception.call_count diff --git a/tests/openlineage_utils.py b/tests/openlineage_utils.py new file mode 100644 index 00000000000..a5424f34c7c --- /dev/null +++ b/tests/openlineage_utils.py @@ -0,0 +1,160 @@ +import re +from enum import Enum +from typing import Dict + +import attr +import pytest +from google.protobuf.json_format import ParseDict +from openlineage.client.event_v2 import RunEvent + +from dbt.events import ALL_PROTO_TYPES +from dbt_common.events.base_types import EventMsg + + +def ol_event_to_dict(event: RunEvent) -> Dict: + def serialize(inst, field, value): + if isinstance(value, Enum): + return value.value + return value + + return attr.asdict(event, value_serializer=serialize) + + +def dict_to_event_msg(e: Dict) -> EventMsg: + msg_class_name = e["info"]["name"] + "Msg" + msg_cls = ALL_PROTO_TYPES[msg_class_name] + return ParseDict(e, msg_cls()) + + +def assert_ol_events_match(expected_event, actual_event): + """ + Match two openlineage events. + Only check for keys that are present in expected_event. + When there is a mismatch, raise an AssertionError with the json path to the mismatch. + """ + + def assert_ol_event_match_rec(expected_event, actual_event, path_to_key): + # dict case + if isinstance(expected_event, dict): + for key in expected_event: + if key not in actual_event: + path_to_key_str = ".".join(path_to_key + [key]) + raise AssertionError(f"Key {path_to_key_str} not found in actual event") + else: + assert_ol_event_match_rec( + expected_event[key], actual_event[key], path_to_key + [key] + ) + # list case + elif isinstance(expected_event, list): + if len(expected_event) != len(actual_event): + path_to_key_str = ".".join(path_to_key + ["[*]"]) + raise AssertionError( + f"List length mismatch at path {path_to_key_str}, expected {len(expected_event)}, actual {len(actual_event)}" + ) + else: + for i, (expected_item, actual_item) in enumerate( + zip(expected_event, actual_event) + ): + assert_ol_event_match_rec(expected_item, actual_item, path_to_key + [f"[{i}]"]) + + # literal string case with regex + elif isinstance(expected_event, str) and _is_regex(expected_event): + + if not _is_match(expected_event, actual_event): + path_to_key = ".".join(path_to_key) + assert ( + expected_event == actual_event + ), f'Value mismatch at path="{path_to_key}"\n It doesn\'t follow expected regex. Checkout value at path in actual event.' + # other literal cases + else: + path_to_key = ".".join(path_to_key) + assert ( + expected_event == actual_event + ), f'Value mismatch at path="{path_to_key}", Checkout value at path in actual event.' + + path_to_key = ["root"] + assert_ol_event_match_rec(expected_event, actual_event, path_to_key) + + +def _is_regex(string) -> bool: + """ + True if the string literal contains a regex. + This is used in tests + foo_{{ abc }}_d will match foo_abc_d + """ + + TEST_REGEX = r"\{\{ .* \}\}" + return re.search(TEST_REGEX, string) is not None + + +def _is_match(pattern, str) -> bool: + escaped_pattern = _escape_special_regex_chars(pattern) + return re.match(escaped_pattern, str) is not None + + +def _escape_special_regex_chars(s) -> str: + """ + Escape all chars that are not surrounded by double {{ }} + """ + + def _append_string_chunks(escape=True): + nonlocal string_chunk, escaped_string + if string_chunk: + string_chunk_str = "".join(string_chunk) + if escape: + string_chunk_str = re.escape(string_chunk_str) + escaped_string.append(string_chunk_str) + string_chunk = [] + + i = 0 + escaped_string = [] + string_chunk = [] + while i < len(s): + if s[i : i + 3] == "{{ ": + _append_string_chunks() + i += 3 + while i < len(s) and s[i : i + 3] != " }}": + string_chunk.append(s[i]) + i += 1 + _append_string_chunks(escape=False) + i += 3 + else: + string_chunk.append(s[i]) + i += 1 + _append_string_chunks() + return "".join(escaped_string) + + +@pytest.fixture(scope="function") +def openlineage_handler_with_dummy_emit(monkeypatch): + """ + Saves the events emitted by Openlineage handler. + """ + + class DummyOpenLineageHandler: + def __init__(self): + self.emitted_events = [] + + def dummy_emit(self, x: RunEvent): + self.emitted_events.append(x) + + dummy_ol_handler = DummyOpenLineageHandler() + monkeypatch.setattr( + "dbt.openlineage.handler.OpenLineageHandler.emit", dummy_ol_handler.dummy_emit + ) + + yield dummy_ol_handler + + +@pytest.fixture(scope="function") +def openlineage_handler_with_raise_exception(monkeypatch): + """ + In integration tests we want the tests to fail when there is an exception + """ + + def raise_exception(self, exception: Exception): + raise exception + + monkeypatch.setattr( + "dbt.openlineage.handler.OpenLineageHandler._handle_exception", raise_exception + ) diff --git a/tests/unit/openlineage/__init__.py b/tests/unit/openlineage/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/unit/openlineage/common/__init__.py b/tests/unit/openlineage/common/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/unit/openlineage/common/test_dataset_facet.py b/tests/unit/openlineage/common/test_dataset_facet.py new file mode 100644 index 00000000000..ead51430f10 --- /dev/null +++ b/tests/unit/openlineage/common/test_dataset_facet.py @@ -0,0 +1,22 @@ +import pytest + +from core.dbt.openlineage.common.dataset_facets import _fix_account_name + + +@pytest.mark.parametrize( + "name, expected", + [ + ("xy12345", "xy12345.us-west-1.aws"), # No '-' or '_' in name + ("xy12345.us-west-1.aws", "xy12345.us-west-1.aws"), # Already complete locator + ("xy12345.us-west-2.gcp", "xy12345.us-west-2.gcp"), # Already complete locator for GCP + ("xy12345aws", "xy12345aws.us-west-1.aws"), # AWS without '-' or '_' + ("xy12345-aws", "xy12345-aws"), # AWS with '-' + ("xy12345_gcp-europe-west1", "xy12345.europe-west1.gcp"), # GCP with '_' + ("myaccount_gcp-asia-east1", "myaccount.asia-east1.gcp"), # GCP with region and '_' + ("myaccount_azure-eastus", "myaccount.eastus.azure"), # Azure with region + ("myorganization-1234", "myorganization-1234"), # No change needed + ("my.organization", "my.organization.us-west-1.aws"), # Dot in name + ], +) +def test_fix_account_name(name, expected): + assert _fix_account_name(name) == expected diff --git a/tests/unit/openlineage/common/test_facet.py b/tests/unit/openlineage/common/test_facet.py new file mode 100644 index 00000000000..4e4c53a0866 --- /dev/null +++ b/tests/unit/openlineage/common/test_facet.py @@ -0,0 +1,147 @@ +from unittest.mock import Mock + +import pytest + +from core.dbt.events.types import FoundStats, NodeFinished, NodeStart +from core.dbt.openlineage.common.facets import ( + OPENLINEAGE_DBT_JOB_NAME_ENV_VAR, + OPENLINEAGE_PARENT_ID_ENV_VAR, + DbtOpenlineageJobType, + ParentRunMetadata, + _get_job_type, + get_job_name, + get_parent_run_facet, +) +from dbt.adapters.events.types import SQLQuery +from tests.openlineage_utils import dict_to_event_msg + +DUMMY_UUID = "e3d27061-5519-4529-b357-93cd3b452245" + + +@pytest.mark.parametrize( + "env_var, expected_parent_run_metadata_data", + [ + ( + f"my-parent-job-namespace/my-parent-job-name/{DUMMY_UUID}", + { + "parent": ParentRunMetadata( + run_id=DUMMY_UUID, + job_name="my-parent-job-name", + job_namespace="my-parent-job-namespace", + ).to_openlineage() + }, + ), + ("", {}), + ], + ids=["with_env_var", "without_env_var"], +) +def test_get_parent_run_facet(env_var, expected_parent_run_metadata_data, monkeypatch): + monkeypatch.setenv(OPENLINEAGE_PARENT_ID_ENV_VAR, env_var) + actual_parent_run_metadata_data = get_parent_run_facet() + assert actual_parent_run_metadata_data == expected_parent_run_metadata_data + + +@pytest.mark.parametrize( + "event, expected_job_type", + [ + ( + { + "info": { + "name": FoundStats.__name__, + } + }, + DbtOpenlineageJobType.job.value, + ), + ({"info": {"name": SQLQuery.__name__}}, DbtOpenlineageJobType.sql.value), + ( + { + "data": { + "node_info": { + "resource_type": "model", + } + }, + "info": {"name": NodeStart.__name__}, + }, + DbtOpenlineageJobType.model.value, + ), + ( + { + "data": { + "node_info": { + "resource_type": "seed", + } + }, + "info": {"name": NodeStart.__name__}, + }, + DbtOpenlineageJobType.seed.value, + ), + ( + { + "data": { + "node_info": { + "resource_type": "snapshot", + } + }, + "info": {"name": NodeStart.__name__}, + }, + DbtOpenlineageJobType.snapshot.value, + ), + ], + ids=["job", "sql", "model", "seed", "snapshot"], +) +def test_get_job_type(event, expected_job_type): + event_message = dict_to_event_msg(event) + + actual_job_type = _get_job_type(event_message) + + assert actual_job_type == expected_job_type + + +@pytest.mark.parametrize( + "env_var, event, expected_job_name", + [ + ( + "my-dbt-job", + { + "info": { + "name": FoundStats.__name__, + } + }, + "my-dbt-job", + ), + ( + "", + { + "info": { + "name": FoundStats.__name__, + } + }, + "dbt-run--project=my-dbt-project--profile=my-profile", + ), + ( + "", + { + "info": { + "name": NodeFinished.__name__, + }, + "data": {"node_info": {"unique_id": "model.jaffle_shop.customers"}}, + }, + "model.jaffle_shop.customers", + ), + ], + ids=["with_env_var", "without_env_var", "with_node_unique_id"], +) +def test_get_job_name(env_var, event, expected_job_name, monkeypatch): + ctx, project, profile, flags = Mock(), Mock(), Mock(), Mock() + event_message = dict_to_event_msg(event) + project.project_name = "my-dbt-project" + profile.profile_name = "my-profile" + flags.select = flags.exclude = flags.selector = None + + monkeypatch.setenv(OPENLINEAGE_DBT_JOB_NAME_ENV_VAR, env_var) + + ctx.obj = {"project": project, "profile": profile, "flags": flags} + + actual_job_name = get_job_name(event_message, ctx) + + assert actual_job_name == expected_job_name diff --git a/tests/unit/openlineage/common/test_utils.py b/tests/unit/openlineage/common/test_utils.py new file mode 100644 index 00000000000..4caf99aa951 --- /dev/null +++ b/tests/unit/openlineage/common/test_utils.py @@ -0,0 +1,17 @@ +import pytest + +from tests.openlineage_utils import _escape_special_regex_chars + + +@pytest.mark.parametrize( + "template_string, escaped_string", + [ + ("{{ .* }}_openlineage_project", ".*_openlineage_project"), + ("{{ [a-z]{0, 2} }}_openlineage_project", "[a-z]{0, 2}_openlineage_project"), + (r"{{ [a-z]{0, 2} }} select *", r"[a-z]{0, 2}\ select\ \*"), + ], + ids=["without_special_chars", "with_special_chars", "with_escaped_special_chars"], +) +def test_escape_special_regex_chars(template_string, escaped_string): + actual_escaped_string = _escape_special_regex_chars(template_string) + assert actual_escaped_string == escaped_string diff --git a/tests/unit/test_events.py b/tests/unit/test_events.py index 8a65c164d45..dbf1b30c255 100644 --- a/tests/unit/test_events.py +++ b/tests/unit/test_events.py @@ -503,6 +503,7 @@ def test_event_codes(self): core_types.ArtifactUploadSuccess(), core_types.ArtifactUploadError(), core_types.ArtifactUploadSkipped(), + core_types.OpenLineageException(), ]