Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update int_netsuite2__transaction_lines.sql #88

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

magoavi
Copy link

@magoavi magoavi commented Oct 10, 2023

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?

  • Yes

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)

  • Yes

Provide an emoji that best describes your current mood

馃拑

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 on our existing dbt packages or what you'd like to see next.

PR Template

This will ensure that transactions are not duplicated downstream due to multiple accounting books.
@fivetran-joemarkiewicz
Copy link
Contributor

@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!

Comment on lines +36 to +37

where transaction_accounting_lines.accounting_book_id in (select accounting_book_id from accounting_books where is_primary)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit worried to directly apply this filter in this model. Could it still be worthwhile to include non primary accounting book accounts in downstream calculations? I wonder if it would be more appropriate to simply add the accounting book fields to these models and allow the end users to filter appropriately based on their needs. Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you @fivetran-joemarkiewicz. accounting_book_id is an important dimension in the transaction line data. This filter could be applied downstream in a production view if needed.

@fivetran-catfritz
Copy link
Contributor

fivetran-catfritz commented Nov 16, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants