8000 fix: pydantic warnings by alangner · Pull Request #125 · nicholasyager/dbt-loom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: pydantic warnings #125

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

Merged
merged 1 commit into from
May 25, 2025

Conversation

alangner
Copy link
Contributor

Resolves: #115

We observed the same warnings as in #115 and tracked it down to the case where we had 3 dbt Projects where:
A -> B (Project B references models from A)
A -> C (Project C references models from A)
B -> C (Project C references models from B)

I was looking at the type(self.resource_type) at

if hasattr(self, "model_dump"):

and saw that most nodes had "<enum 'NodeType'>", except for seeds and hooks from Project A which are loaded via Project B (here the type is "<class 'str'>"). The same seeds/hooks from Project A directly have "<enum 'NodeType'>" (in our constellation these resources are loaded twice as we reference both A and B with dbt-loom)

cf. https://stackoverflow.com/questions/65209934/pydantic-enum-field-does-not-get-converted-to-string

Copy link
Owner
@nicholasyager nicholasyager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @alangner! Approved.

@nicholasyager nicholasyager merged commit 114df17 into nicholasyager:main May 25, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pydantic warnings after upgrade to dbt-core 1.9.1. State selection does not work.
2 participants
0