diff --git a/core/dbt/constants.py b/core/dbt/constants.py index feaf0957746..20dd8519855 100644 --- a/core/dbt/constants.py +++ b/core/dbt/constants.py @@ -15,5 +15,6 @@ PACKAGE_LOCK_FILE_NAME = "package-lock.yml" MANIFEST_FILE_NAME = "manifest.json" SEMANTIC_MANIFEST_FILE_NAME = "semantic_manifest.json" +TIME_SPINE_MODEL_NAME = "metricflow_time_spine" PARTIAL_PARSE_FILE_NAME = "partial_parse.msgpack" PACKAGE_LOCK_HASH_KEY = "sha1_hash" diff --git a/core/dbt/contracts/graph/semantic_manifest.py b/core/dbt/contracts/graph/semantic_manifest.py index cf268571425..8ff68198384 100644 --- a/core/dbt/contracts/graph/semantic_manifest.py +++ b/core/dbt/contracts/graph/semantic_manifest.py @@ -15,6 +15,7 @@ SemanticManifestValidator, ) +from dbt.constants import TIME_SPINE_MODEL_NAME from dbt.events.types import SemanticValidationFailure from dbt.exceptions import ParsingError from dbt_common.clients.system import write_file @@ -82,8 +83,7 @@ def _get_pydantic_semantic_manifest(self) -> PydanticSemanticManifest: # Look for time-spine table model and create time spine table configuration if self.manifest.semantic_models: # Get model for time_spine_table - time_spine_model_name = "metricflow_time_spine" - model = self.manifest.ref_lookup.find(time_spine_model_name, None, None, self.manifest) + model = self.manifest.ref_lookup.find(TIME_SPINE_MODEL_NAME, None, None, self.manifest) if not model: raise ParsingError( "The semantic layer requires a 'metricflow_time_spine' model in the project, but none was found. "