fivetran / dbt_netsuite

Data models for Fivetran's Netsuite connector, built using dbt.
https://fivetran.github.io/dbt_netsuite/
Apache License 2.0
36 stars 34 forks source link

Update int_netsuite2__transaction_lines.sql #88

Open magoavi opened 11 months ago

magoavi commented 11 months ago

This will ensure that transactions are not duplicated downstream due to multiple accounting books.

Avi Mago | Our Habitas

Link the issue/feature request which this PR is meant to address

Detail what changes this PR introduces and how this addresses the issue/feature request linked above.

How did you validate the changes introduced within this PR?

Which warehouse did you use to develop these changes?

Did you update the CHANGELOG?

Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)

Provide an emoji that best describes your current mood

:dancer: **Feedback** We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your [feedback](https://www.surveymonkey.com/r/DQ7K7WW) on our existing dbt packages or what you'd like to see next. **PR Template** - [Community Pull Request Template](?expand=1&template=pull_request_template.md) (default) - [Maintainer Pull Request Template](?expand=1&template=maintainer_pull_request_template.md) (to be used by maintainers)
fivetran-joemarkiewicz commented 11 months ago

@magoavi thanks for opening this PR!

We have actually been seeing a number of requests lately around accounting books in Netsuite (#85 as an example). I do not have much experience with multi book accounting in Nestuite and would like to understand it in more detail. Would you be able to share why you are seeing duplicates in the current version of the package and how your suggested changes resolves this issue. Thanks!

fivetran-catfritz commented 9 months ago

Hi @magoavi! We have just released a beta version that might be a solution for what you're trying to do. In this version, multibook (and accounting_book_id as a result) is disabled by default and there should not be duplicate transactions due to accounting_book_id. If you'd like to give it a try, you can install the beta using:

packages:
  - package: fivetran/netsuite
    version: 0.12.0-b1

If you try it out, let us know how it goes!