dbt-msft / tsql-utils

dbt-utils for the dbt-msft family of packages
MIT License
25 stars 24 forks source link

test for `insert_by_period` is failing... don't know why #67

Open dataders opened 2 years ago

dataders commented 2 years ago

@davidclarance maybe you can help me with this? happy to give more context later -- just jotting this down for now

test's compiled SQL


-- setup

with a as (

    select * from "dbt-msft-serverless-db"."test"."test_insert_by_period"

),

b as (

    select * from "dbt-msft-serverless-db"."test"."expected_insert_by_period"

),

a_minus_b as (

    select "id", "created_at" from a

    except

    select "id", "created_at" from b

),

b_minus_a as (

    select "id", "created_at" from b

    except

    select "id", "created_at" from a

),

unioned as (

    select 'a_minus_b' as which_diff, * from a_minus_b
    union all
    select 'b_minus_a' as which_diff, * from b_minus_a

)

select * from unioned

results

which_diff id created_at
b_minus_a 3 2018-02-02
b_minus_a 4 2018-03-02
b_minus_a 5 2018-04-02
b_minus_a 6 2018-05-02
davidclarance commented 2 years ago

@swanderz sure, i'll take a look.