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] Unit test fixture null values cause typing issues #10365

Open
2 tasks done
VersusFacit opened this issue Jun 26, 2024 · 0 comments · May be fixed by #10366
Open
2 tasks done

[Bug] Unit test fixture null values cause typing issues #10365

VersusFacit opened this issue Jun 26, 2024 · 0 comments · May be fixed by #10366
Assignees
Labels
bug Something isn't working

Comments

@VersusFacit
Copy link
Contributor

VersusFacit commented Jun 26, 2024

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

Unit test fixtures are parsed correctly, but they leave typing up to the target database. This will result in unhandled database failures when there is no one row Null free (this handles indirectly the all values in a column Null failure case). The database won't be able to determine which type to use and default to something like VARCHAR(1) which may not be what the source table expects -- this leads to a type failure.

This change is motivated by a redshift change but could affect other adapters some day.

Expected Behavior

Let's sort this to give fixtures the best chance to succeed or in unwinnable situations, error out with a known exception.

Steps To Reproduce

See reprex here

Relevant log output

No response

Environment

- OS:
- Python:
- dbt:

Which database adapter are you using with dbt?

redshift

Additional Context

See redshift PR here

@VersusFacit VersusFacit added bug Something isn't working triage labels Jun 26, 2024
@VersusFacit VersusFacit self-assigned this Jun 26, 2024
@VersusFacit VersusFacit linked a pull request Jun 26, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant