fivetran / dbt_sage_intacct

Fivetran data models for Sage Intacct using dbt.
https://fivetran.github.io/dbt_sage_intacct/#!/overview
Apache License 2.0
5 stars 6 forks source link

add null to coalesce #17

Closed fivetran-reneeli closed 1 year ago

fivetran-reneeli commented 1 year ago

PR Overview

This PR will address the following Issue/Feature: Issue #16

This PR will result in the following new package version: v0.2.2

Marked as nonbreaking as this shouldn't break current models, but help those with the current coalesce issue successfully run the models.

Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:

The variables sage_intacct__using_bills and sage_intacct__using_invoices are used in coalesce statements. In the case where 1 is true and the other is false, the sage_intacct__ap_ar_enhanced fails for some warehouses. This is because in some warehouses like Snowflake, the coalesce clause is unable to only take 1 argument. Therefore, as a fix, this PR explicitly adds a null as a third argument. That way, for this scenario, there will still be 2 arguments.

In addition, I've added the aforementioned variable scenario to integration testing

PR Checklist

Basic Validation

Please acknowledge that you have successfully performed the following commands locally:

Before marking this PR as "ready for review" the following have been applied:

Detailed Validation

Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":

After running the models I now see currency_code as an added field.

Standard Updates

Please acknowledge that your PR contains the following standard updates:

dbt Docs

Please acknowledge that after the above were all completed the below were applied to your branch:

If you had to summarize this PR in an emoji, which would it be?

🤑