Skip to content
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

dbt v1 compat #453

Merged
merged 15 commits into from
Dec 2, 2021
Merged
Prev Previous commit
Next Next commit
GOOD
  • Loading branch information
joellabes committed Dec 2, 2021
commit ef240c7ff2380352de6e0d5ac353c666aaeaa886
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
{% set column_values = dbt_utils.get_column_values(ref('data_get_column_values_dropped'), 'field', default=['y', 'z'], order_by="field") %}

with expected as (
select {{ dbt_utils.safe_cast('y', dbt_utils.type_string()) }} as expected union all
select {{ dbt_utils.safe_cast('z', dbt_utils.type_string()) }} as expected
select {{ dbt_utils.safe_cast("'y'", dbt_utils.type_string()) }} as expected union all
select {{ dbt_utils.safe_cast("'z'", dbt_utils.type_string()) }} as expected
),

actual as (
select

{% for val in column_values %}
{{ dbt_utils.safe_cast("'" ~ val ~ "'", dbt_utils.type_string()) }} as actual
select {{ dbt_utils.safe_cast("'" ~ val ~ "'", dbt_utils.type_string()) }} as actual
{% if not loop.last %}
union all
{% endif %}
Expand Down