-
Notifications
You must be signed in to change notification settings - Fork 35
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Customer & Vendor joins in transaction_details #109
Comments
hey @jmongerlyra thanks for opening this and adding the fix to your PR! left one question for you in the PR here -- we'll be reviewing your PR this sprint FYI 🤠 |
Thanks for addressing this issue in the existing PR @jmongerlyra ! I should hopefully pick up work on validating that all is well on this PR you've opened in this coming sprint. |
I removed the patch from the existing PR. Needs some optimization. We will submit a separate PR once a new patch is available. |
No worries @jmongerlyra ! Looking forward for that PR. I completed a first review of your PR, and we have a review open for your code with some requested changes. Please go ahead and take a look. We're getting closer to having this ready to fold this into a future release of the package! |
Hi @jmongerlyra , hope all is well, just wanted to circle back here. 1) I believe you were going to submit a new PR after the initial run was too slow. How is the status of that PR at the moment? |
@fivetran-avinash Thanks for the follow up. Here's the current status of our fork against Fivetran main. main...jmongerlyra:dbt_netsuite:main
This is addressed in our fork. The issue is vendor and customer data lives in various fields depending on the transaction type. See here for customers.
We are still using the recursive CTE since that works in Snowflake. I can submit a new PR and you can strip out the full_name fields that depend on these joins? That would at least address the customer and vendor issue. We also have some minor bugs fixes in our fork for account numbers and is leftside values on Retained Earnings and CTA. |
@fivetran-avinash I went ahead and removed the recursive CTEs. See PR here to address this bug. #131 |
Hey @jmongerlyra, thanks for raising this new PR last week! I can see you put a lot of thought and care into creating this out. This is quite a hefty PR to validate in its current state. Would it be possible for you to break up this PR into two separate PRs so we can better review and validate the changes for each:
Particularly around the second PR, we'd love if you could open up a new issue detailing the balance sheet updates, particularly regarding
Right now, it's not quite clear in this issue why these changes are being introduced. An issue with supporting details for why these changes need to be made will make it easier for us to accelerate development. Then this will help us validate that your solution is the right one for all customers to use in a faster and more timely fashion. If you can open up that issue and separate out the PRs, then I think we will be ready to roll out the first PR ASAP and then make sure the second PR is addressed in a very near sprint. Hope this approach makes sense! Let me know if you have any questions, and thanks for your patience here. |
@fivetran-avinash Definitely. I have removed updates from the branch that were unrelated to the customer & vendor join issue. This should make it easier to review. Let me know if you have any questions. |
Thanks so much @jmongerlyra for splitting everything out! I have some comments in the other issue you created, but I believe the plan is to bring this issue into a coming sprint so we can close it out very shortly! We will be in touch on this issue when we begin working on validating this bug fix. |
Thanks again for all the work you've put into separating out all these changes @jmongerlyra . Greatly appreciate our partnership in this work. After conducting some internal validation that these changes make sense, I've merged your PR into a release branch and will do our usual maintenance to ensure this PR is release ready. Will be in touch once these changes are live! |
Hi @jmongerlyra just circling back here and making sure these changes worked well for you! |
@fivetran-avinash yep, we merged v0.14.0 into our fork. |
Is there an existing issue for this?
Describe the issue
There is a bug in
netsuite2__transaction_details model
that causescompany_name
andvendor_name
to be NULL on certain lines.The issue is in the joins to customer and vendor master tables. Certain transaction types can contain both transaction_lines.entity_id (line level) and transactions.entity_id (header level) values. The current join preferences the former in all cases.
However, in the example of a vendor bill with a billable customer referenced at the line level, this logic causes the customer ID to be joined to the vendor master table, resulting in a NULL. Instead, the join should be contingent on transaction type.
We will finalize a patch and submit a PR.
Relevant error log or model output
Expected behavior
Customer should always be populated on invoices and vendors always populated on bills.
dbt Project configurations
Package versions
What database are you using dbt with?
snowflake
dbt Version
1.7.3
Additional Context
No response
Are you willing to open a PR to help address this issue?
The text was updated successfully, but these errors were encountered: