From 2dddf25ceebd3eecc8e0b242d45badf83a1a0d90 Mon Sep 17 00:00:00 2001 From: Pawel Marut Date: Thu, 29 Jan 2026 15:20:28 +0100 Subject: [PATCH] Add dbt-run and dbt-version facets validation Signed-off-by: Pawel Marut --- producer/dbt/runner/openlineage.yml | 4 ++-- scripts/validate_ol_events.py | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/producer/dbt/runner/openlineage.yml b/producer/dbt/runner/openlineage.yml index c1acf9cd..22ff8d7d 100644 --- a/producer/dbt/runner/openlineage.yml +++ b/producer/dbt/runner/openlineage.yml @@ -1,4 +1,4 @@ transport: type: file - log_file_path: ../events/openlineage_events.jsonl - append: true + log_file_path: ../output/events.jsonl + append: true \ No newline at end of file diff --git a/scripts/validate_ol_events.py b/scripts/validate_ol_events.py index f8f3572d..321bbc14 100644 --- a/scripts/validate_ol_events.py +++ b/scripts/validate_ol_events.py @@ -27,9 +27,7 @@ def is_custom_facet(facet, schema_type): if facet.get('_schemaURL') is not None: is_custom = any(facet.get('_schemaURL').__contains__(f'defs/{facet_type}Facet') for facet_type in ['Run', 'Job', 'Dataset', 'InputDataset', 'OutputDataset']) - is_common = any(facet.get('_schemaURL').__contains__(f'schema/{facet_type}-facet.json') for facet_type in - ['dbt-version-run', 'dbt-run-run']) - if is_custom or is_common: + if is_custom: print(f"facet {schema_type} seems to be custom facet, validation skipped") return True return False @@ -37,7 +35,7 @@ def is_custom_facet(facet, schema_type): @staticmethod def is_facet(path): # List of facets from the common package that can be used for syntax validation - common_facets = ['dbt-node-job-facet.json'] + common_facets = ['dbt-node-job-facet.json','dbt-version-run-facet.json','dbt-run-run-facet.json'] return 'Facet.json' in path or path in common_facets @classmethod