Comments (6)
Thanks Joe.
With your advice I was able to do this.
First ever dbt PR attempted.
#30
from dbt_xero.
Hi @danieltaft thanks so much for opening this issue!
After looking closer at the issue you described above, there definitely seems to be something that needs to be adjusted within the package logic to ensure this net_amount
duplication does not happen.
I did a quick look and believe I found the cause for this erroneous multiplication of the amounts when being unioned. We can see below that the xero__balance_sheet_report
is being cross joined on a previous CTE.
However, this above CTE does not have the source_relation
field. As such, we are cross joining without a where
condition to ensure the source relations match on this cross join. As such, the totals for net_amount
are incorrectly added on top of the other sources.
I believe a proper fix would involve adding a source_relation
field within this CTE and then adding the following where
clause to the joined CTE.
where year_end.source_relation = ledger.source_relation
I see you are open to creating a PR! 🏅 If you would like to attempt a PR I would be happy to assist you further 😄 Let me know if you would be interested. Otherwise, our team will be able to pick this up at the start of our next sprint cycle.
from dbt_xero.
Thanks so much for opening the PR @danieltaft 🏅 We really appreciate contributions from community members as they are what help improve these packages!
Someone from my team will pick up the PR at the start of our next sprint and will let you know if we have any clarifying questions or requests before we merge and release!
from dbt_xero.
Hey @danieltaft congratulations on your first PR! 🥳 I just reviewed it and it looks great. I'm sure you have already checked out that the data looks right on your end, but I want to confirm with you before I make some general updates to make your PR ready for merge and release. Let me know if you have any questions!
from dbt_xero.
Hi @fivetran-sheringuyen - yes I have confirmed it works on my end and the data is correct with this change.
from dbt_xero.
I've just cut the release for your updates @danieltaft, watch out for it on the dbt package hub and looking forward to seeing more contributions in the future! 🎉
from dbt_xero.
Related Issues (20)
- BUG - All Xero Dbt jobs failing due to missing table HOT 3
- FEATURE - [To be able to generate Employee Remuneration Report present in Xero] HOT 3
- BUG - Reports generated from the Zero DBT package has the wrong net_amount HOT 5
- FEATURE - [Allow to Combine Multiple Xero Companies] HOT 4
- dbt_utils_unique_combination_of_columns_xero__general_ledger_journal_line_id__source_relation fails when journal line id is NULL HOT 1
- BUG - unique_xero__profit_and_loss_report_profit_and_loss_id fails when account_name column differs HOT 9
- BUG - rows in the xero__general_ledger model that have a NULL value in the journal_line_id column HOT 14
- Postgres Compatibility
- BUG - [your bug title here] HOT 5
- FEATURE - [Add Purchase Orders to Xero packages] HOT 6
- [Bug] Bank Transaction table missing HOT 5
- [Bug] Test Failure in dbt xero package HOT 7
- [Feature] Databricks compatability
- [Feature] README Updates HOT 1
- [Feature] Xero Cash Summary report in DBT HOT 1
- [Bug] Unique combination test failing - impacts production deployment HOT 12
- Add more cols to xero__balance_sheet_report / xero__invoice_line_items / xero__profit_and_loss_report views. HOT 2
- [Bug] Using BigQuery adapter, validation_errors - Invalid cast from STRING to JSON HOT 7
- Feature Request -- Join Contact details to General Ledger HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbt_xero.