Skip to content

Commit 8e62d25

Browse files
committed
Add dbt-run and dbt-version facets validation
Signed-off-by: Pawel Marut <pawel.marut@xebia.com>
1 parent 4599674 commit 8e62d25

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

scripts/validate_ol_events.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,15 @@ def is_custom_facet(facet, schema_type):
2727
if facet.get('_schemaURL') is not None:
2828
is_custom = any(facet.get('_schemaURL').__contains__(f'defs/{facet_type}Facet') for facet_type in
2929
['Run', 'Job', 'Dataset', 'InputDataset', 'OutputDataset'])
30-
is_common = any(facet.get('_schemaURL').__contains__(f'schema/{facet_type}-facet.json') for facet_type in
31-
['dbt-version-run', 'dbt-run-run'])
32-
if is_custom or is_common:
30+
if is_custom:
3331
print(f"facet {schema_type} seems to be custom facet, validation skipped")
3432
return True
3533
return False
3634

3735
@staticmethod
3836
def is_facet(path):
3937
# List of facets from the common package that can be used for syntax validation
40-
common_facets = ['dbt-node-job-facet.json']
38+
common_facets = ['dbt-node-job-facet.json','dbt-version-run-facet.json','dbt-run-run-facet.json']
4139
return 'Facet.json' in path or path in common_facets
4240

4341
@classmethod

0 commit comments

Comments
 (0)