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] Null values #11365

Open
2 tasks done
dinoDayo opened this issue Mar 5, 2025 · 0 comments
Open
2 tasks done

[Bug] Null values #11365

dinoDayo opened this issue Mar 5, 2025 · 0 comments
Labels
bug Something isn't working triage

Comments

@dinoDayo
Copy link

dinoDayo commented Mar 5, 2025

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

I have not been able to find anything in the documentation or the code base that explains how DBT recommends managing null values. A solution to this problem would be extremely helpful.

For example, consider I have model A which is dependent on model B. When I define a null value in model B, that value is converted to None when I reference that value in model A. This makes data management and analysis extremely difficult. I believe the built-in method for identifying whether or not a value is equal to null in dbt core would address this problem for me. If such a function exists, an example of how to use it would be much appreciated.

Thank you for your time.

Expected Behavior

I would expect that a null value is consistently null as it is passed between different models and macros.
At this point I am converting them to adapter.quote('NULL'), which results in "'NULL'", which I can then convert to null values at the end of the model definition. This is not ideal though.

Steps To Reproduce

Define a table with null values and then reference those null values in another model. In the downstream model the null values will be versed to None.

Relevant log output

Environment

- OS:
- Python:
- dbt:

Which database adapter are you using with dbt?

No response

Additional Context

No response

@dinoDayo dinoDayo added bug Something isn't working triage labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant