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

DBT 0.17.0rc3 - Compilation failure regression #2504

Closed
1 of 5 tasks
AcidFlow opened this issue May 30, 2020 · 2 comments
Closed
1 of 5 tasks

DBT 0.17.0rc3 - Compilation failure regression #2504

AcidFlow opened this issue May 30, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@AcidFlow
Copy link

Describe the bug

When trying to compile a project having some schema tests using dbt_utils.equality the compilation fails because the model does not exists.
However calling DBT run works.

The compilation failure happens when using DBT 0.17.0rc3, however compiling the same project using DBT 0.16.1 succeeds.

Steps To Reproduce

The following ZIP file includes a dummy project to reproduce the issue.
dummy.zip

You will need to configure a profile for it though.

Extract the project and run:

dbt deps
dbt compile

Expected behavior

The compilation succeeds on both DBT 0.16.1 and 0.17.0rc3

Actual behavior

The compilation succeeds for DBT 0.16.1 and fails for 0.17.0rc3 with the following error:

Encountered an error:
Runtime Error
  Database Error in test dbt_utils_equality_my_second_dbt_model_id__ref_my_first_dbt_model_ (models/example/schema.yml)
    002003 (42S02): SQL compilation error:
    Table 'DB.SCHEMA.MY_SECOND_DBT_MODEL' does not exist or not authorized.

System information

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

The output of dbt --version:

dbt --version
installed version: 0.17.0-rc3
   latest version: 0.16.1

Your version of dbt is ahead of the latest release!

Plugins:
  - snowflake: 0.17.0rc3
  - postgres: 0.17.0rc3
  - redshift: 0.17.0rc3
  - bigquery: 0.17.0rc3

The operating system you're using: Linux Mint 19.3

The output of python --version: Python 3.6.9

@AcidFlow AcidFlow added bug Something isn't working triage labels May 30, 2020
@beckjake
Copy link
Contributor

beckjake commented Jun 1, 2020

Thank you for the writeup and the wonderful reproduction case! 🙏 I believe the root cause here is that we switched snowflake's get_columns_in_relation to use describe table, which results in a database error -> an exception when the relation is missing. Other adapters select from the information_schema and just return an empty list when there are no columns. The new snowflake behavior seems like a regression to me for sure!

@beckjake beckjake removed the triage label Jun 1, 2020
@beckjake beckjake added this to the Octavius Catto milestone Jun 1, 2020
beckjake added a commit that referenced this issue Jun 2, 2020
…lumns-missing-relation

fix get_columns_in_relation on snowflake (#2504)
@beckjake
Copy link
Contributor

beckjake commented Jun 2, 2020

Fixed in #2509

@beckjake beckjake closed this as completed Jun 2, 2020
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

No branches or pull requests

2 participants