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

Bugfix/union data type comp #22

Closed fivetran-joemarkiewicz closed 4 months ago

fivetran-joemarkiewicz commented 4 months ago

PR Overview

This PR will address the following Issue/Feature: Internal issue raised for incompatible data types in ap_ar_enhanced union

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

This will not be a breaking change as it is simply enforcing the datatype that it is already defined as. Some customers experienced the upstream datatypes mismatching. However, for those users this model never succeeded. For users that have seen success, there will be no changes noticed.

Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:

🚨 Breaking Changes: Bug Fixes 🚨

  • The account_no and offset_gl_account_no fields in the sage_intacct__ap_ar_enhanced end model are now consistently casted as strings using {{ dbt.type_string() }}. This ensures compatibility within the union all operation, preventing datatype conflicts between the fields within the upstream invoice_item and bill_item tables.

Under the Hood

  • Addition of integrity and consistency validation tests within integration tests for the sage_intacct__ap_ar_enhanced model.
  • Updates to the accountno and amount seed datatypes within the integration tests to more closely resemble the datatype of those fields in the Sage Intacct connector.

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 share any and all of your validation steps:

Please run the devprodtest command to see the validations are succeeding as expected. Below are the results, and you may inspect the code within the tests folder. image

Further, I was able to update the seed files to recreate the issue and also was able to recreate the issue in the customers environment. Upon applying these changes, the issue is now resolved. Additionally, I did inspect the other fields to determine if similar casting would be needed. Fortunately, we cast all the other suspect fields as strings in the upstream models. Therefore, no additional casting will be necessary.

Before changes

After changes

Please note, this release was made within the transform so Quickstart users will be able to access the fix ASAP.

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

🧪
ryan-systematik commented 4 months ago

Hi @fivetran-joemarkiewicz and @fivetran-avinash, thank you for your efforts on this! Can we have an idea as to when this can be resolved? We're using this dbt package at the moment, and are experiencing the errors.

fivetran-joemarkiewicz commented 4 months ago

Hi @ryan-systematik this will likely be resolved either today or tomorrow.