Xero dbt Package
This dbt package transforms data from Fivetran's Xero connector into analytics-ready tables.
Resources
- Number of materialized models¹: 35
- Connector documentation
- dbt package documentation
What does this dbt package do?
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.
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.
Output schema
Final output tables are generated in the following target schema:
<your_database>.<connector/schema_name>_xero
Final output tables
By default, this package materializes the following final tables:
| Table | Description |
|---|---|
| xero__general_ledger | 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. Example Analytics Questions:
|
| xero__profit_and_loss_report | Summarizes monthly profit and loss by account with net amounts to track revenue, expenses, and profitability trends over time at the account level. Example Analytics Questions:
|
| xero__balance_sheet_report | Shows the monthly balance sheet position for each account to track assets, liabilities, and equity over time and understand financial health. Example Analytics Questions:
|
| xero__invoice_line_items | Provides detailed invoice line item data enriched with account, contact, and invoice information including amounts, taxes, and payment status to analyze billing and revenue. Example Analytics Questions:
|
¹ 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.
Prerequisites
To use this dbt package, you must have the following:
- At least one Fivetran Xero connection syncing data into your destination.
- A BigQuery, Snowflake, Redshift, PostgreSQL, or Databricks destination.
How do I use the dbt package?
You can either add this dbt package in the Fivetran dashboard or import it into your dbt project:
- To add the package in the Fivetran dashboard, follow our Quickstart guide.
- To add the package to your dbt project, follow the setup instructions in the dbt package's README file to use this package.
How is this package maintained and can I contribute?
Package Maintenance
The Fivetran team maintaining this package only maintains the latest version of the package. We highly recommend you stay consistent with the latest version of the package and refer to the CHANGELOG and release notes for more information on changes across versions.
Contributions
A small team of analytics engineers at Fivetran develops these dbt packages. However, the packages are made better by community contributions.
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.