fivetran / dbt_fivetran_utils

Helper utils for our packages
29 stars 19 forks source link

make union_data more robust #99

Closed fivetran-jamie closed 1 year ago

fivetran-jamie commented 1 year ago

see https://github.com/fivetran/dbt_shopify_source/issues/57

When no sources in a union_schema or union_database array have a table (or if the first schema/db in the array doesn't have it?) our models fail, because we are not doing the cast(null as <data_type>) as field_in_table_we_dont_have thing. I think we should add a parameter to the uniondata macro that is a dictionary/json very similar to what we have in the `get

_columns` macros. then union_data could handle the null stuff