-
Notifications
You must be signed in to change notification settings - Fork 47
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
[SEMANTIC-232] [Regression] dbt_metrics_default_calendar on redshift fails to build with "can't execute an empty query" starting in 1.4.1 #229
Comments
Can confirm that the yml file was first added Feb 28 after the 1.4.0 tag (Jan 21) and before the 1.4.1 tag (Mar 3). |
Further this bug only occurs if you have persist_docs at the column setup in your dbt_project the compiled and run versions of the model sql is fine.
confirmed.
|
@kylezeeuwen do you mind editing the local version of your calendar yml file and seeing if it runs with the lowercase? From my end it appears that this change passes our testing suite but I want to confirm it resolves your issue. version: 2
models:
- name: dbt_metrics_default_calendar
description: |
An auto generated calendar table that used for metrics.
columns:
- name: date_day
description: "Date"
- name: date_week
description: "Date truncated into week"
- name: date_month
description: "Date truncated into month"
- name: date_quarter
description: "Date truncated into quarter"
- name: date_year
description: "Date truncated into year" |
Hi @callum-mcdata I was talking about reproduction steps with a colleague and he mentioned that you would need this setting in your test suite to reproduce the issue:
If this is set on the redshift session then case sensitive is on, else it defaults to off. |
@kylezeeuwen would you be able to test on your version? This is enough of an edge case and relies on configuring properties outside of dbt that I am leaning towards not adding a test for it (especially as I would prefer not to muck about with our Redshift session parameters 😅 ) . If you can confirm on your local that it works fine with the changes I'll get a PR opened and have it be included in the next release |
yep I just tested and can confirm changing yml columns to lower case fixes the issue
|
worth noting that If you have json with camel case or title case keys you must have this setting enabled or you cant extract values from json fields with capital case names unless you have the above set (at least thats how we interpret the available options 🤷) |
Is this a regression in a recent version of dbt_metrics?
Current Behavior
when i
dbt run
my project (that has metrics and metrics.calculate usage) I get the following failure:Expected/Previous Behavior
the
dbt run
should succeedSteps To Reproduce
Note I wrote this up here as well : https://getdbt.slack.com/archives/CBSQTAPLG/p1680218676837929
dbt-core=1.4.5
dbt-redshift=1.4.0
packages.yml
dbt run
and get failuredbt deps
I believe this is related to the casing mismatch of column names between these two files:
this is described by Jeremy Cohen in a comment on this bug report : dbt-labs/dbt-core#5183 (comment)
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
redshift
Additional Context
No response
The text was updated successfully, but these errors were encountered: