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

Rm spaces from NodeType strings #7842

Merged
merged 2 commits into from
Jun 12, 2023
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
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20230612-070827.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Rm space from NodeType strings
time: 2023-06-12T07:08:27.276551-04:00
custom:
Author: jtcohen6
Issue: "7841"
4 changes: 2 additions & 2 deletions core/dbt/node_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ class NodeType(StrEnum):
Seed = "seed"
# TODO: rm?
RPCCall = "rpc"
SqlOperation = "sql operation"
SqlOperation = "sqloperation"
Documentation = "doc"
Source = "source"
Macro = "macro"
Exposure = "exposure"
Metric = "metric"
Group = "group"
SemanticModel = "semantic model"
SemanticModel = "semanticmodel"

@classmethod
def executable(cls) -> List["NodeType"]:
Expand Down
4 changes: 2 additions & 2 deletions test/unit/test_node_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
NodeType.Operation: "operations",
NodeType.Seed: "seeds",
NodeType.RPCCall: "rpcs",
NodeType.SqlOperation: "sql operations",
NodeType.SqlOperation: "sqloperations",
NodeType.Documentation: "docs",
NodeType.Source: "sources",
NodeType.Macro: "macros",
NodeType.Exposure: "exposures",
NodeType.Metric: "metrics",
NodeType.Group: "groups",
NodeType.SemanticModel: "semantic models",
NodeType.SemanticModel: "semanticmodels",
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ def test_semantic_model_parsing(self, project):
assert isinstance(result.result, Manifest)
manifest = result.result
assert len(manifest.semantic_nodes) == 1
semantic_model = manifest.semantic_nodes["semantic model.test.revenue"]
semantic_model = manifest.semantic_nodes["semanticmodel.test.revenue"]
assert semantic_model.node_relation.alias == "fct_revenue"