Skip to content

Commit

Permalink
Add parsed_column_name property to PydanticTimeSpineCustomGranularity…
Browse files Browse the repository at this point in the history
…Column
  • Loading branch information
courtneyholcomb committed Sep 4, 2024
1 parent 47f831e commit 843597c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dbt_semantic_interfaces/implementations/time_spine.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ def _implements_protocol(self) -> TimeSpineCustomGranularityColumn:
name: str
column_name: Optional[str] = None

@property
def parsed_column_name(self) -> str:
"""Get column name. Assumed `name` attribute unless `column_name` is set."""
return self.column_name or self.name


class PydanticTimeSpine(HashableBaseModel, ProtocolHint[TimeSpine]): # noqa: D101
@override
Expand Down

0 comments on commit 843597c

Please sign in to comment.