fivetran / dbt_netsuite_source

Data models for Fivetran's Netsuite source package, built using dbt.
https://fivetran.github.io/dbt_netsuite_source/
Apache License 2.0
14 stars 20 forks source link

Netsuite2.com Support #15

Closed jamesrayoub closed 2 years ago

jamesrayoub commented 2 years ago

Pull Request Are you a current Fivetran customer? Yes, James from Dandelion Geothermal

What change(s) does this PR introduce? Support for Netsuite2.com

Did you update the CHANGELOG?

Does this PR introduce a breaking change?

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)

Is this PR in response to a previously created Bug or Feature Request

How did you test the PR changes?

Select which warehouse(s) were used to test the PR

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.
jamesrayoub commented 2 years ago

@fivetran-joemarkiewicz let me know what you think here. The docs could probably use some polishing up, but I think these are the core tables needed to replicate the functionality of the downstream dbt_netsuite package. Look forward to working together to bring this to production; hopefully it's a good start!

fivetran-jamie commented 2 years ago

@jamesrayoub this is an amazing start 🙌 i changed the base branch to fivetran:feature/netsuite2 and will merge this PR and work out of that branch moving forward FYI

fivetran-jamie commented 2 years ago

@jamesrayoub noticed you brought in a few new tables, namely jobs, entities, and transaction_accounting_lines. how do you envision folding these in in downstream models? or generally what are you looking to get out of em

jamesrayoub commented 2 years ago

@jamesrayoub noticed you brought in a few new tables, namely jobs, entities, and transaction_accounting_lines. how do you envision folding these in in downstream models? or generally what are you looking to get out of em

@fivetran-jamie I need to use jobs & entities to link to external entities in other downstream models. For example: we need to be able to roll up expenses at the project level to determine total project COGS - I use the external ID's of the jobs entity to accomplish this. This may be more bespoke to our instance, but I can imagine other customers may need to do the same sort of thing with different entities.

However, I believe transaction_accounting_lines is a more generalizable to all instances... it seems that transaction_lines does not contain the correct line item amount values as it did in the old schema. I've found that it's necessary to join transaction_accounting_lines to transaction_lines in order to get the correct line item amounts and associate account. Albert from Aleph (who I think your team has worked with) saw similar issues and was able to resolve using transaction_accounting_lines. I'd be happy to have a call to discuss this table a bit more because it was a source of confusion when I put this package edit together.