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

[Bug] ParsedNode for seed node dup #11040

Open
2 tasks done
JamesBonddu opened this issue Nov 24, 2024 · 1 comment · May be fixed by #11041
Open
2 tasks done

[Bug] ParsedNode for seed node dup #11040

JamesBonddu opened this issue Nov 24, 2024 · 1 comment · May be fixed by #11041
Labels
bug Something isn't working tidy_first "Tidy First" incremental cleanup changes

Comments

@JamesBonddu
Copy link

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

    @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

- OS: Ubuntu20.04
- Python: 3.10
- dbt: 1.1.1

Which database adapter are you using with dbt?

No response

Additional Context

No response

@JamesBonddu JamesBonddu added bug Something isn't working triage labels Nov 24, 2024
@JamesBonddu JamesBonddu changed the title [Bug] <title> ParsedNode for seed node dup [Bug] ParsedNode for seed node dup Nov 24, 2024
@JamesBonddu JamesBonddu linked a pull request Nov 24, 2024 that will close this issue
@dbeatty10
Copy link
Contributor

Good eyes @JamesBonddu ! 🦅

@dbeatty10 dbeatty10 added tidy_first "Tidy First" incremental cleanup changes and removed triage labels Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tidy_first "Tidy First" incremental cleanup changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants