diff --git a/dbt_semantic_interfaces/implementations/time_spine.py b/dbt_semantic_interfaces/implementations/time_spine.py index b010d3d2..7d666d0f 100644 --- a/dbt_semantic_interfaces/implementations/time_spine.py +++ b/dbt_semantic_interfaces/implementations/time_spine.py @@ -35,6 +35,15 @@ def _implements_protocol(self) -> TimeSpineCustomGranularityColumn: name: str column_name: Optional[str] = None + @property + def parsed_column_name(self) -> str: + """The name of the column in the time spine table that contains this custom granularity. + + For convenience in writing configs, if there is no `column_name` set, we assume the `name` + is also the column name. + """ + return self.column_name or self.name + class PydanticTimeSpine(HashableBaseModel, ProtocolHint[TimeSpine]): # noqa: D101 @override diff --git a/pyproject.toml b/pyproject.toml index 70038144..c7daf956 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "dbt-semantic-interfaces" -version = "0.7.1" +version = "0.7.2.dev0" description = 'The shared semantic layer definitions that dbt-core and MetricFlow use' readme = "README.md" requires-python = ">=3.8"