fivetran / dbt_xero

Data models for Fivetran's Xero connector built using dbt.
https://fivetran.github.io/dbt_xero/#!/overview
Apache License 2.0
10 stars 21 forks source link

dbt_utils_unique_combination_of_columns_xero__general_ledger_journal_line_id__source_relation fails when journal line id is NULL #17

Closed jazzy-r closed 3 years ago

jazzy-r commented 3 years ago

There are instances where there are rows in the xero__general_ledger model that have a NULL value in the journal_line_id column.

This causes the test:

dbt_utils_unique_combination_of_columns_xerogeneral_ledger_journal_line_idsource_relation

because the NULL values are seen to be the same journal_line_id

Suggestion

We could add journal_id or journal_number to the relations test. However, there still might be a case where there is a journal with more than one row in the model that has a NULL value in journal_line_id

jazzy-r commented 3 years ago

Closing because I didn't use the template