[Bug] ParsedNode for seed node dup
- Dominant language
- Rust
- Stars
- 13.8k
- Forks
- 2.6k
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 56
Description
### Is this a new bug in dbt-core?
- [X] I believe this is a new bug in dbt-core
- [X] I have searched the existing issues, and I could not find an existing issue for this bug
### Current Behavior
```python
@classmethod
def _deserialize(cls, dct: Dict[str, int]):
# The serialized ParsedNodes do not differ from each other
# in fields that would allow 'from_dict' to distinguis
# between them.
resource_type = dct["resource_type"]
if resource_type == "model":
return ModelNode.from_dict(dct)
elif resource_type == "analysis":
return AnalysisNode.from_dict(dct)
elif resource_type == "seed":
return SeedNode.from_dict(dct)
elif resource_type == "sql":
return SqlNode.from_dict(dct)
elif resource_type == "test":
if "test_metadata" in dct:
return GenericTestNode.from_dict(dct)
else:
return SingularTestNode.from_dict(dct)
elif resource_type == "operation":
return HookNode.from_dict(dct)
elif resource_type == "seed":
return SeedNode.from_dict(dct)
elif resource_type == "snapshot":
return SnapshotNode.from_dict(dct)
else:
return cls.from_dict(dct)
```
https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/contracts/graph/nodes.py
### Expected Behavior
we need seed node only once
### Steps To Reproduce
https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/contracts/graph/nodes.py
### Relevant log output
_No response_
### Environment
```markdown
- OS: Ubuntu20.04
- Python: 3.10
- dbt: 1.1.1
```
### Which database adapter are you using with dbt?
_No response_
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.