-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Improve Error Message for Persisted Comments on Columns #3039
Comments
Thanks for the detailed write-up @elikastelein! I really like a lot of what you've got to say above :) I think there are a few options here:
Personally, I like the third option, for two reasons:
There's one drawback: Not every database supports What do you think? |
Thanks for the reply @jtcohen6. Using
Cool, I'll start a PR for this in the next couple of weeks |
Nice, glad to hear it! There is a small downside that I failed to mention above. To take advantage of alter table dev_jerco.my_model alter
col1 comment 'hello'
col2 comment 'goodbye'
badcol comment 'this one is missing'
; To one DDL statement per column comment: comment if exists on column dev_jerco.my_model.col1 is 'hello';
comment if exists on column dev_jerco.my_model.col2 is 'goodbye';
comment if exists on column dev_jerco.my_model.badcol is 'this one is missing'; IMO that's a small price to pay, as each statement should still run quite quickly. |
I made a very small PR here: #3149 |
Describe the bug
.yml
file that doesn't exist in the modelDatabase Error ... invalid identifier '<colum_name>'
but this message could be potentially improved to direct you closer to the specific problem.Steps To Reproduce
models/staging/stg_orders.sql
models/staging/schema.yml
dbt_project.yml
On snowflake:
Run
dbt run --models stg_orders
dbt.log
dbt.log
Expected behavior
run
, it's not immediately obvious that the cause of the error is the "foo" column existing in the .yml but not the .sql model (we tend to mentally associate the .yml file only with the testing step)target/run/jaffle_shop/models/staging/stg_orders.sql
the comment commands aren't there, making debugging a bit harderScreenshots and log output
dbt.log
System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using: Mac OS
The output of
python --version
: Python 3.8.5Additional context
I'm very interested in working on this issue myself but wanted to first see if anybody else had feedback or thoughts to share about it.
The text was updated successfully, but these errors were encountered: