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

chore: apply sqlfmt aca4b6a #4

Merged
merged 3 commits into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ with
select
{{ dbt_utils.safe_cast("'" ~ val ~ "'", dbt_utils.type_string()) }}
as actual_column_value
{% if not loop.last %} union all {% endif %}
{% if not loop.last %}
union all
{% endif %}
{% endfor %}
),

Expand Down
13 changes: 11 additions & 2 deletions macros/cross_db_utils/except.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
{% endmacro %}


{% macro default__except() %} except {% endmacro %}
{% macro default__except() %}

{% macro bigquery__except() %} except distinct {% endmacro %}
except

{% endmacro %}

{% macro bigquery__except() %}

except
distinct

{% endmacro %}
13 changes: 11 additions & 2 deletions macros/cross_db_utils/intersect.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
{% endmacro %}


{% macro default__intersect() %} intersect {% endmacro %}
{% macro default__intersect() %}

{% macro bigquery__intersect() %} intersect distinct {% endmacro %}
intersect

{% endmacro %}

{% macro bigquery__intersect() %}

intersect
distinct

{% endmacro %}
8 changes: 7 additions & 1 deletion macros/generic_tests/cardinality_equality.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ with

except_b as (select * from table_b {{ dbt_utils.except() }} select * from table_a),

unioned as (select * from except_a union all select * from except_b)
unioned as (
select *
from except_a
union all
select *
from except_b
)

select *
from unioned
Expand Down
6 changes: 5 additions & 1 deletion macros/sql/generate_series.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
{% set n = dbt_utils.get_powers_of_two(upper_bound) %}

with
p as (select 0 as generated_number union all select 1),
p as (
select 0 as generated_number
union all
select 1
),
unioned as (

select
Expand Down
4 changes: 3 additions & 1 deletion macros/sql/union.sql
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@
from {{ relation }}
)

{% if not loop.last -%} union all {% endif -%}
{% if not loop.last -%}
union all
{% endif -%}

{%- endfor -%}

Expand Down
4 changes: 3 additions & 1 deletion macros/sql/unpivot.sql
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ select

from {{ relation }}

{% if not loop.last -%} union all {% endif -%}
{% if not loop.last -%}
union all
{% endif -%}
{%- endfor -%}

{%- endmacro %}