Skip to content

Commit

Permalink
Restrict custom granularities from having the same names as semantic …
Browse files Browse the repository at this point in the history
…models, too
  • Loading branch information
courtneyholcomb committed Sep 5, 2024
1 parent d68f991 commit 783f1e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dbt_semantic_interfaces/validations/unique_valid_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ def _validate_semantic_model_elements_and_time_spines(semantic_manifest: Semanti

for metric in semantic_manifest.metrics:
custom_granularity_restricted_names_and_types[metric.name] = SemanticManifestNodeType.METRIC.value
for semantic_model in semantic_manifest.semantic_models:
custom_granularity_restricted_names_and_types[semantic_model.name] = (
SemanticManifestNodeType.SEMANTIC_MODEL.value
)

# Verify custom granularity names are unique across relevant elements
seen_custom_granularity_names: Set[str] = set()
Expand Down

0 comments on commit 783f1e3

Please sign in to comment.