Skip to content

Commit ebe99f5

Browse files
Merge pull request #22 from fivetran/hotfix/gl-update-account-fields
switching account fields in gl model
2 parents 7633675 + 836121a commit ebe99f5

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# dbt_xero v0.3.1
2+
## Bug Fix
3+
- The `account_code`, `account_id`, `account_name`, and `account_type` fields within the `xero_general_ledger` are now being selected from the `stg_xero__account` model instead of the `stg_xero__journal_line` model.
4+
- It was found that account names may be changed within Xero, but the account name within a journal line entry will remain the old name. As such, this fix will ensure all records on the `xero__general_ledger` and downstream models reflect the most up to date name of the account.
5+
16
# dbt_xero v0.3.0
27

38
## Features

dbt_project.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'xero'
2-
version: '0.3.0'
2+
version: '0.3.1'
33
config-version: 2
44
require-dbt-version: [">=0.20.0"]
55

@@ -20,4 +20,4 @@ models:
2020
+materialized: table
2121
+schema: xero
2222
utilities:
23-
+materialized: ephemeral
23+
+materialized: ephemeral

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.3.0'
2+
version: '0.3.1'
33
profile: 'integration_tests'
44
config-version: 2
55

models/xero__general_ledger.sql

+5-7
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,18 @@ with journals as (
4545
journals.reference,
4646
journals.source_id,
4747
journals.source_type,
48-
journals.source_relation,
49-
48+
journals.source_relation,
5049
journal_lines.journal_line_id,
51-
journal_lines.account_code,
52-
journal_lines.account_id,
53-
journal_lines.account_name,
54-
journal_lines.account_type,
50+
accounts.account_code,
51+
accounts.account_id,
52+
accounts.account_name,
53+
accounts.account_type,
5554
journal_lines.description,
5655
journal_lines.gross_amount,
5756
journal_lines.net_amount,
5857
journal_lines.tax_amount,
5958
journal_lines.tax_name,
6059
journal_lines.tax_type,
61-
6260
accounts.account_class,
6361

6462
case when journals.source_type in ('ACCPAY', 'ACCREC') then journals.source_id end as invoice_id,

0 commit comments

Comments
 (0)