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

get_columns_in_relation fails on the first run, when called on a model created in that run #196

Closed
ali-tny opened this issue Jul 23, 2021 · 1 comment · Fixed by #197
Closed
Labels
bug Something isn't working

Comments

@ali-tny
Copy link
Contributor

ali-tny commented Jul 23, 2021

Describe the bug

Calling get_columns_in_relation on a model that was created in the same run leads to a expected string or bytes-like object error on the first run, where the cache is not populated correctly.

Steps To Reproduce

Create a model and a downstream model that uses get_columns_in_relation, created in the same run.

Expected behavior

No error (falling back to querying information schema where the cache is not sufficient)

Screenshots and log output

Fails with

Unhandled error while executing model_name
expected string or bytes-like object

The output of dbt --version:

installed version: 0.20.0
   latest version: 0.20.0

Up to date!

Plugins:
  - spark: 0.20.0

The operating system you're using: MacOS Mojave

The output of python --version: Python 3.8.3

Additional context

Described in this slack thread

@ali-tny ali-tny added bug Something isn't working triage labels Jul 23, 2021
@jtcohen6
Copy link
Contributor

Thanks for opening @ali-tny, and for contributing the fix! I'm out of the office today, will take a look early next week

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.

2 participants