Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove name from time spine config #317

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
Expand Up @@ -804,9 +804,6 @@
"$id": "time_spine_schema",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"node_relation": {
"$ref": "#/definitions/node_relation_schema"
},
Expand All @@ -815,7 +812,6 @@
}
},
"required": [
"name",
"node_relation",
"primary_column"
],
Expand Down
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
Loading