You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Produces modeled tables that leverage Xero data from [Fivetran's connector](https://fivetran.com/docs/applications/xero) in the format described by [this ERD](https://fivetran.com/docs/applications/xero#schemainformation).
34
+
This package enables you to produce modeled tables, provide analytics-ready models, and generate comprehensive data dictionaries. It creates enriched models with metrics focused on profit and loss reports, general ledgers, and balance sheet reports.
35
+
36
+
> Note: Currently, our dbt models for Xero have limited support for multi-currency accounting, particularly for handling unrealized currency gains and losses and bank revaluations, as they require historical or current exchange rate data that is not available in the Xero connector to fully calculate.
37
+
38
+
### Output schema
39
+
Final output tables are generated in the following target schema:
20
40
21
-
- Provides analytics-ready models, including a profit and loss report, general ledger, and balance sheet report.
22
-
- Generates a comprehensive data dictionary of your source and modeled Xero data through the [dbt docs site](https://fivetran.github.io/dbt_xero/).
41
+
```
42
+
<your_database>.<connector/schema_name>_xero
43
+
```
23
44
24
-
<!--section=“xero_transformation_model"-->
45
+
### Final output tables
25
46
26
-
The following table provides a detailed list of all tables materialized within this package by default.
47
+
By default, this package materializes the following final tables:
|[xero__general_ledger](https://github.com/fivetran/dbt_xero/blob/main/models/xero__general_ledger.sql)| Each record represents a journal line item. Use the ledger to create the balance sheet and the profit and loss statement. |
31
-
|[xero__profit_and_loss_report](https://github.com/fivetran/dbt_xero/blob/main/models/xero__profit_and_loss_report.sql)| Each record represents a profit and loss line item at the month and account level. |
32
-
|[xero__balance_sheet_report](https://github.com/fivetran/dbt_xero/blob/main/models/xero__balance_sheet_report.sql)| Each record represents the state of the balance sheet for a given account on a given month. |
33
-
|[xero__invoice_line_items](https://github.com/fivetran/dbt_xero/blob/main/models/xero__invoice_line_items.sql)| Each record represents an invoice line item enriched with the account, contact, and invoice information. |
49
+
| Table|Description |
50
+
|:---- |:---- |
51
+
|[xero__general_ledger](https://github.com/fivetran/dbt_xero/blob/main/models/xero__general_ledger.sql)| Tracks every journal line item with debits, credits, and account classifications to provide a complete transaction history for building financial statements and analyzing account activity. <br></br>**Example Analytics Questions:**<ul><li>What is the total net amount by account class (asset, liability, equity, revenue, expense) for a given period?</li><li>Which accounts have the highest transaction volumes or largest balance changes?</li><li>How do journal entries by source type (invoice, payment, manual) contribute to overall financial activity?</li></ul>|
52
+
|[xero__profit_and_loss_report](https://github.com/fivetran/dbt_xero/blob/main/models/xero__profit_and_loss_report.sql)| Summarizes monthly profit and loss by account with net amounts to track revenue, expenses, and profitability trends over time at the account level. <br></br>**Example Analytics Questions:**<ul><li>What are monthly revenue and expense trends by account class (revenue vs expense)?</li><li>Which expense accounts are growing fastest month-over-month?</li><li>What is the net profit or loss for each month across all revenue and expense accounts?</li></ul>|
53
+
|[xero__balance_sheet_report](https://github.com/fivetran/dbt_xero/blob/main/models/xero__balance_sheet_report.sql)| Shows the monthly balance sheet position for each account to track assets, liabilities, and equity over time and understand financial health. <br></br>**Example Analytics Questions:**<ul><li>What is the current balance for each asset, liability, and equity account?</li><li>How have account balances changed month-over-month across different account classes?</li><li>What is the total asset value versus total liability value for each reporting period?</li></ul>|
54
+
|[xero__invoice_line_items](https://github.com/fivetran/dbt_xero/blob/main/models/xero__invoice_line_items.sql)| Provides detailed invoice line item data enriched with account, contact, and invoice information including amounts, taxes, and payment status to analyze billing and revenue. <br></br>**Example Analytics Questions:**<ul><li>Which customers or contacts generate the highest invoice amounts and line item volumes?</li><li>What are the most common products or services sold based on line item descriptions?</li><li>How do discount rates and tax amounts vary across different invoice line items or customers?</li></ul>|
34
55
35
-
### Materialized Models
36
-
Each Quickstart transformation job run materializes 35 models if all components of this data model are enabled. This count includes all staging, intermediate, and final models materialized as `view`, `table`, or `incremental`.
37
-
<!--section-end-->
56
+
¹ Each Quickstart transformation job run materializes these models if all components of this data model are enabled. This count includes all staging, intermediate, and final models materialized as `view`, `table`, or `incremental`.
38
57
39
-
## How do I use the dbt package?
58
+
---
40
59
41
-
### Step 1: Prerequisites
60
+
## Prerequisites
42
61
To use this dbt package, you must have the following:
43
62
44
63
- At least one Fivetran Xero connection syncing data into your destination.
45
64
- A **BigQuery**, **Snowflake**, **Redshift**, **PostgreSQL**, or **Databricks** destination.
46
65
47
-
### Step 2: Install the package
66
+
## How do I use the dbt package?
67
+
You can either add this dbt package in the Fivetran dashboard or import it into your dbt project:
68
+
69
+
- To add the package in the Fivetran dashboard, follow our [Quickstart guide](https://fivetran.com/docs/transformations/data-models/quickstart-management).
70
+
- To add the package to your dbt project, follow the setup instructions in the dbt package's [README file](https://github.com/fivetran/dbt_xero/blob/main/README.md#how-do-i-use-the-dbt-package) to use this package.
71
+
72
+
<!--section-end-->
73
+
74
+
### Install the package
48
75
Include the following xero package version in your `packages.yml` file:
49
76
> TIP: Check [dbt Hub](https://hub.getdbt.com/) for the latest installation instructions or [read the dbt docs](https://docs.getdbt.com/docs/package-management) for more information on installing packages.
50
77
```yaml
51
78
packages:
52
79
- package: fivetran/xero
53
-
version: [">=1.1.0", "<1.2.0"] # we recommend using ranges to capture non-breaking changes automatically
80
+
version: [">=1.2.0", "<1.3.0"] # we recommend using ranges to capture non-breaking changes automatically
54
81
```
55
82
> All required sources and staging models are now bundled into this transformation package. Do not include `fivetran/xero_source` in your `packages.yml` since this package has been deprecated.
56
-
### Step 3: Define database and schema variables
83
+
84
+
### Define database and schema variables
57
85
By default, this package runs using your destination and the `xero` schema. If this is not where your Xero data is (for example, if your Xero schema is named `xero_fivetran`), add the following configuration to your root `dbt_project.yml` file:
58
86
59
87
```yml
@@ -62,7 +90,7 @@ vars:
62
90
xero_database: your_database_name
63
91
```
64
92
65
-
### (Optional) Step 4: Additional configurations
93
+
### (Optional) Additional configurations
66
94
67
95
#### Change the calendar start date
68
96
Our date-based models start at `2019-01-01` by default. To customize the start date, add the following variable to your `dbt_project.yml` file:
### (Optional) Step 5: Orchestrate your models with Fivetran Transformations for dbt Core™
166
+
### (Optional) Orchestrate your models with Fivetran Transformations for dbt Core™
139
167
<details><summary>Expand for details</summary>
140
168
<br>
141
169
142
-
Fivetran offers the ability for you to orchestrate your dbt project through [Fivetran Transformations for dbt Core™](https://fivetran.com/docs/transformations/dbt). Learn how to set up your project for orchestration through Fivetran in our [Transformations for dbt Core setup guides](https://fivetran.com/docs/transformations/dbt#setupguide).
170
+
Fivetran offers the ability for you to orchestrate your dbt project through [Fivetran Transformations for dbt Core™](https://fivetran.com/docs/transformations/dbt#transformationsfordbtcore). Learn how to set up your project for orchestration through Fivetran in our [Transformations for dbt Core setup guides](https://fivetran.com/docs/transformations/dbt/setup-guide#transformationsfordbtcoresetupguide).
143
171
144
172
</details>
145
173
@@ -155,14 +183,19 @@ packages:
155
183
- package: dbt-labs/dbt_utils
156
184
version: [">=1.0.0", "<2.0.0"]
157
185
```
186
+
187
+
<!--section="xero_maintenance"-->
158
188
## How is this package maintained and can I contribute?
189
+
159
190
### Package Maintenance
160
-
The Fivetran team maintaining this package _only_ maintains the latest version of the package. We highly recommend you stay consistent with the [latest version](https://hub.getdbt.com/fivetran/xero/latest/) of the package and refer to the [CHANGELOG](https://github.com/fivetran/dbt_xero/blob/main/CHANGELOG.md) and release notes for more information on changes across versions.
191
+
The Fivetran team maintaining this package only maintains the [latest version](https://hub.getdbt.com/fivetran/xero/latest/) of the package. We highly recommend you stay consistent with the latest version of the package and refer to the [CHANGELOG](https://github.com/fivetran/dbt_xero/blob/main/CHANGELOG.md) and release notes for more information on changes across versions.
161
192
162
193
### Contributions
163
194
A small team of analytics engineers at Fivetran develops these dbt packages. However, the packages are made better by community contributions.
164
195
165
-
We highly encourage and welcome contributions to this package. Check out [this dbt Discourse article](https://discourse.getdbt.com/t/contributing-to-a-dbt-package/657) on the best workflow for contributing to a package.
196
+
We highly encourage and welcome contributions to this package. Learn how to contribute to a package in dbt's [Contributing to an external dbt package article](https://discourse.getdbt.com/t/contributing-to-a-dbt-package/657).
197
+
198
+
<!--section-end-->
166
199
167
200
## Are there any resources available?
168
201
- If you have questions or want to reach out for help, see the [GitHub Issue](https://github.com/fivetran/dbt_xero/issues/new/choose) section to find the right avenue of support for you.
0 commit comments