You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, I ran into an issue when trying to exclude columns from my dbt model using dbt_utils.star. This was happening because my command wasn't correctly formatted.
Because of this, my model was returning column_a and column_b because jinja2's list comparison doesn't find column_a to equal COLUMN_A (which makes sense).
Issue:
Recently, I ran into an issue when trying to exclude columns from my dbt model using
dbt_utils.star
. This was happening because my command wasn't correctly formatted.example.sql
Because of this, my model was returning
column_a
andcolumn_b
because jinja2's list comparison doesn't findcolumn_a
to equalCOLUMN_A
(which makes sense).Solution:
Cast both the input and except list to lower:
dbt-utils/macros/sql/star.sql
Line 19 in 696cf26
Note this is for snowflake specifically but this change should will work for every dbt supportive sql flavor.
The text was updated successfully, but these errors were encountered: