Skip to content

Commit b7554b5

Browse files
Merge pull request #31 from fivetran/bugfix/balance-sheet-dupes
Bugfix/balance sheet dupes
2 parents f6e1f27 + ecaad12 commit b7554b5

8 files changed

+22
-14
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# dbt_xero v0.4.2
2+
## Bug Fix
3+
- Fixes duplicate values in `net_amount` field in `xero__balance_sheet_report` when leveraging logic to union multiple Xero connectors
4+
## Contributors
5+
- [@danieltaft](https://github.com/danieltaft)[#30](https://github.com/fivetran/dbt_xero/pull/30)
6+
17
# dbt_xero v0.4.1
28
## Features
39
- Adds the `xero__using_bank_transaction` variable to disable the associated models on instances of Xero that don't include the `bank_transaction` source table. ([#27](https://github.com/fivetran/dbt_xero/pull/27))

dbt_project.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'xero'
2-
version: '0.4.1'
2+
version: '0.4.2'
33
config-version: 2
44
require-dbt-version: [">=1.0.0", "<2.0.0"]
55

docs/catalog.json

+1-1
Large diffs are not rendered by default.

docs/index.html

+8-8
Large diffs are not rendered by default.

docs/manifest.json

+1-1
Large diffs are not rendered by default.

docs/run_results.json

+1-1
Large diffs are not rendered by default.

integration_tests/dbt_project.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'xero_integration_tests'
2-
version: '0.4.1'
2+
version: '0.4.2'
33
profile: 'integration_tests'
44
config-version: 2
55

models/xero__balance_sheet_report.sql

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ with calendar as (
2020
when cast(extract(year from current_date) || '-' || financial_year_end_month || '-' || financial_year_end_day as date) >= current_date
2121
then cast(extract(year from current_date) || '-' || financial_year_end_month || '-' || financial_year_end_day as date)
2222
else cast(extract(year from {{ dbt_utils.dateadd('year', -1, 'current_date') }}) || '-' || financial_year_end_month || '-' || financial_year_end_day as date)
23-
end as current_year_end_date
23+
end as current_year_end_date,
24+
source_relation
2425
from organization
2526

2627
), joined as (
@@ -54,6 +55,7 @@ with calendar as (
5455
inner join ledger
5556
on calendar.date_month >= cast({{ dbt_utils.date_trunc('month', 'ledger.journal_date') }} as date)
5657
cross join year_end
58+
where year_end.source_relation = ledger.source_relation
5759
{{ dbt_utils.group_by(7) }}
5860

5961
)

0 commit comments

Comments
 (0)