Skip to content

Commit

Permalink
GOOD
Browse files Browse the repository at this point in the history
  • Loading branch information
joellabes committed Dec 2, 2021
1 parent 68b187f commit ef240c7
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit ef240c7

Please sign in to comment.