-
Notifications
You must be signed in to change notification settings - Fork 59
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
[Bug] Unclear error message when a column in a contracted model is missing a data_type
#707
Comments
ReprexCreate project files as described in dbt-labs/dbt-core#8063. Then run: dbt seed && dbt run -s my_model And get an error like this:
There's a full stack trace within Proposed solutionTo match the order in dbt-postgres, dbt-bigquery, and dbt-snowflake, just flip the order of these two lines: dbt-redshift/dbt/include/redshift/macros/adapters.sql Lines 51 to 52 in f95c534
It's supposed to be this before this: {{ get_assert_columns_equivalent(sql) }}
{{ get_table_columns_and_constraints() }} Nice-to-haveAdd some defensive code immediately above here to raise a helpful error message when the if not v.get("data_type"):
raise ColumnTypeMissingError([col_name]) |
data_type
data_type
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers. |
As originally reported in dbt-labs/dbt-core#8063 and dbt-labs/dbt-core#8070:
Originally posted by @yuna-tang in dbt-labs/dbt-core#8070 (comment)
Hi @jtcohen6, I find this post when we try to implement the contract configs for our models.
We are on dbt1.6, however, I see different error messages:
We are using redshift and dbt1.6. I would prefer to see messages like below.
05:26:10 Running with dbt=1.6.5
05:26:10 Registered adapter: redshift=1.6.0
The text was updated successfully, but these errors were encountered: