-
Notifications
You must be signed in to change notification settings - Fork 179
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
[Regression] [Bug] Incorrect column order in view after successful job run #1180
Comments
@crystalro0 just so I fully understand the issue, basically what is happening is the order in which the columns are displayed are not in the order in which they are declared from the initial CTE A (as is carried into CTE B --> CTE C + 2 new columns)? Did they just start to see this happening on versionless? Also what is the impact of this on their project? |
@amychen1776 correct, then their column values get mixed up. Yes, on versionless. The impact is the wrong data in the wrongly positioned column, so their downstream model fails due to the switch of type of value. I'm not sure on the actual percentage, but I would say there are intermittent job failures with that downstream model. As a quick aside, the user has created a feature request with Snowflake as well. |
@crystalro0 apologies - I might be missing something; what do you mean by wrong data in the wrong column? |
@amychen1776 no worries! that downstream column is expecting a numeric datatype and ends up with a text field.
|
Thank you! That's super helpful |
@crystalro0 what version did their project work with? Does this behavior happen in 1.7 as well? |
Likely culprit is that the call we make to retrieve the columns is non-deterministic in the order of the columns or that we are changing the sort after the fact, we need to look at preserving a given order. |
sorry @colin-rogers-dbt I missed this! I believe it was working with 1.7 before the move to versionless. |
Is this a new bug in dbt-snowflake?
Current Behavior
hi all! I have a customer that is experiencing incorrect column order in their Cloud jobs which is causing errors. They've reported to Snowflake and they in turn identified a possible issue with the way we create the view/table. Currently, they're seeing a
SELECT *
during the create or replace.Seeing
{% set model_columns = model.columns %}
here:dbt-snowflake/dbt/include/snowflake/macros/relations/view/create.sql
Line 13 in 3fbc074
They're on versionless and on Snowflake. I've been unable to reproduce the issue with a similar source table and ref'd model.
Expected Behavior
Columns in order as per the table/view structure or query updates.
Steps To Reproduce
Relevant log output
No response
Environment
Additional Context
Needs refinement - may be generic dbt adapters issue.
The text was updated successfully, but these errors were encountered: