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 archive creates lower case maintenance columns on Snowflake #1167

Closed
clausherther opened this issue Dec 4, 2018 · 2 comments · Fixed by #1361
Closed

dbt archive creates lower case maintenance columns on Snowflake #1167

clausherther opened this issue Dec 4, 2018 · 2 comments · Fixed by #1361
Labels
snapshots Issues related to dbt's snapshot functionality

Comments

@clausherther
Copy link
Contributor

Looks like the query to create archive tables for Snowflake is quoted and uses lower case names for the maintenance columns:

create table if not exists archive.my_table_archived (
    
    "MY_COL1" character varying(16777216),
  
    "MY_COL2" character varying(16777216),
  
    "MY_DATE_COL" DATE,
  
    "valid_from" TIMESTAMP,
  
    "valid_to" TIMESTAMP,
  
    "scd_id" character varying(255),
  
    "dbt_updated_at" TIMESTAMP
  
  );

This causes problems when querying the archived tables without using quoted column names:

select * from archive.my_table_archived
where valid_from>='2018-12-03'
[42000][904] SQL compilation error: error line 2 at position 6 invalid identifier 'VALID_FROM'
@clausherther
Copy link
Contributor Author

FYI, quoting is off in the config:

quoting:
    identifier: false
    schema: false

@jthandy jthandy added the snapshots Issues related to dbt's snapshot functionality label Dec 4, 2018
@drewbanin drewbanin added this to the Wilt Chamberlain milestone Dec 4, 2018
@drewbanin
Copy link
Contributor

Thanks for the report @clausherther - this is prioritized for our Wilt Chamberlain release. See #251 for more information on the proposed approach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
snapshots Issues related to dbt's snapshot functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants