Skip to content
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
1 change: 0 additions & 1 deletion integration_tests/macros/tests.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{% test assert_equal(model, actual, expected) %}
select * from {{ model }} where {{ actual }} != {{ expected }}

Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/cross_db_utils/test_concat.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

with data as (select * from {{ ref("data_concat") }})

select {{ dbt_utils.concat(["input_1", "input_2"]) }} as actual, output as expected
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

-- how can we test this better?
select
{{ dbt_utils.current_timestamp() }} as actual,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

-- how can we test this better?
select
{{ dbt_utils.current_timestamp_in_utc() }} as actual,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

with data as (select * from {{ ref("data_date_trunc") }})

select
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/cross_db_utils/test_dateadd.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

with data as (select * from {{ ref("data_dateadd") }})

select
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/cross_db_utils/test_datediff.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

with data as (select * from {{ ref("data_datediff") }})

select
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/cross_db_utils/test_hash.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

with data as (select * from {{ ref("data_hash") }})

select {{ dbt_utils.hash("input_1") }} as actual, output as expected
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/cross_db_utils/test_last_day.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

with data as (select * from {{ ref("data_last_day") }})

select
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/cross_db_utils/test_safe_cast.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

with data as (select * from {{ ref("data_safe_cast") }})

select
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

with data as (select * from {{ ref("data_split_part") }})

select
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

with data as (select * from {{ ref("data_width_bucket") }})

select
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/datetime/test_date_spine.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

-- snowflake doesn't like this as a view because the `generate_series`
-- call creates a CTE called `unioned`, as does the `equality` generic test.
-- Ideally, Snowflake would be smart enough to know that these CTE names are
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/generic_tests/test_recency.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{% if target.type == "postgres" %}

select {{ dbt_utils.date_trunc("day", dbt_utils.current_timestamp()) }} as today
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/sql/test_generate_series.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

-- snowflake doesn't like this as a view because the `generate_series`
-- call creates a CTE called `unioned`, as does the `equality` generic test.
-- Ideally, Snowflake would be smart enough to know that these CTE names are
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/sql/test_get_column_values.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{% set column_values = dbt_utils.get_column_values(
ref("data_get_column_values"), "field", default=[], order_by="field"
) %}
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/sql/test_pivot.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

-- TODO: How do we make this work nicely on Snowflake too?
{% if target.type == "snowflake" %}
{% set column_values = ["RED", "BLUE"] %} {% set cmp = "ilike" %}
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/sql/test_pivot_apostrophe.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

-- TODO: How do we make this work nicely on Snowflake too?
{% if target.type == "snowflake" %}
{% set column_values = ["RED", "BLUE", "BLUE'S"] %} {% set cmp = "ilike" %}
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/sql/test_safe_add.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

with data as (select * from {{ ref("data_safe_add") }})

select {{ dbt_utils.safe_add("field_1", "field_2", "field_3") }} as actual, expected
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/sql/test_surrogate_key.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

with data as (select * from {{ ref("data_surrogate_key") }})

select
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/sql/test_union.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

select id, name, favorite_color from {{ ref("test_union_base") }}
1 change: 0 additions & 1 deletion integration_tests/models/sql/test_union_base.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

{{ dbt_utils.union_relations([ref("data_union_table_1"), ref("data_union_table_2")]) }}
1 change: 0 additions & 1 deletion integration_tests/models/sql/test_unpivot.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

-- snowflake messes with these tests pretty badly since the
-- output of the macro considers the casing of the source
-- table columns. Using some hacks here to get this to work,
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/sql/test_unpivot_bool.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

-- snowflake messes with these tests pretty badly since the
-- output of the macro considers the casing of the source
-- table columns. Using some hacks here to get this to work,
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/sql/test_unpivot_original_api.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

-- unpivot() was enhanced with 3 new parameters
-- This test targets the original API.
-- snowflake messes with these tests pretty badly since the
Expand Down
1 change: 0 additions & 1 deletion integration_tests/models/web/test_urls.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

with data as (select * from {{ ref("data_urls") }})

select
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{% set column_values = dbt_utils.get_column_values(
ref("data_get_column_values_dropped"),
"field",
Expand Down
2 changes: 0 additions & 2 deletions macros/cross_db_utils/concat.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


{% macro concat(fields) -%}
{{ return(adapter.dispatch("concat", "dbt_utils")(fields)) }}
{%- endmacro %}
Expand Down
1 change: 0 additions & 1 deletion macros/cross_db_utils/literal.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{%- macro string_literal(value) -%}
{{ return(adapter.dispatch("string_literal", "dbt_utils")(value)) }}
{%- endmacro -%}
Expand Down
1 change: 0 additions & 1 deletion macros/generic_tests/not_constant.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{% test not_constant(model, column_name) %}
{{ return(adapter.dispatch("test_not_constant", "dbt_utils")(model, column_name)) }}
{% endtest %}
Expand Down