Skip to content

Commit

Permalink
Remove name from time spine config
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Jul 25, 2024
1 parent d1bf57a commit 79739d3
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
1 change: 0 additions & 1 deletion dbt_semantic_interfaces/implementations/time_spine.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ class PydanticTimeSpine(HashableBaseModel, ProtocolHint[TimeSpine]):
def _implements_protocol(self) -> TimeSpine:
return self

name: str
node_relation: PydanticNodeRelation
primary_column: PydanticTimeSpinePrimaryColumn
3 changes: 1 addition & 2 deletions dbt_semantic_interfaces/parsing/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,11 @@
"$id": "time_spine_schema",
"type": "object",
"properties": {
"name": {"type": "string"},
"node_relation": {"$ref": "node_relation_schema"},
"primary_column": {"$ref": "time_spine_primary_column_schema"},
},
"additionalProperties": False,
"required": ["name", "node_relation", "primary_column"],
"required": ["node_relation", "primary_column"],
}


Expand Down
6 changes: 0 additions & 6 deletions dbt_semantic_interfaces/protocols/time_spine.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ class TimeSpine(Protocol):
custom granularity columns. Custom granularity columns are not yet implemented.
"""

@property
@abstractmethod
def name(self) -> str:
"""A name the user assigns to this time spine."""
pass

@property
@abstractmethod
def node_relation(self) -> NodeRelation:
Expand Down
4 changes: 1 addition & 3 deletions tests/example_project_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
],
time_spines=[
PydanticTimeSpine(
name="day_time_spine",
node_relation=PydanticNodeRelation(alias="day_time_spine", schema_name="stuff"),
primary_column=PydanticTimeSpinePrimaryColumn(name="ds_day", time_granularity=TimeGranularity.DAY),
)
Expand All @@ -41,8 +40,7 @@
column_name: ds
grain: day
time_spines:
- name: day_time_spine
node_relation:
- node_relation:
schema_name: stuff
alias: day_time_spine
primary_column:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ project_configuration:
column_name: ds
grain: day
time_spines:
- name: day_time_spine
node_relation:
- node_relation:
schema_name: stuff
alias: day_time_spine
primary_column:
Expand Down

0 comments on commit 79739d3

Please sign in to comment.