This package contains staging models, designed to work simultaneously with our Xero transform package. The staging models name columns consistently across all packages:
- Boolean fields are prefixed with
- ID primary keys are prefixed with the name of the table. For example, the campaign table’s ID column is renamed
Include in your
packages: - package: fivetran/xero_source version: [">=0.4.0", "<0.5.0"]
By default, this package will look for your Xero data in the
xero schema of your target database. If this is not where your Xero data is, add the following configuration to your
... config-version: 2 vars: xero_schema: your_schema_name xero_database: your_database_name
Unioning Multiple Xero Connectorslink
If you have multiple Xero connectors in Fivetran and would like to use this package on all of them simultaneously, we have provided functionality to do so. The package will union all of the data together and pass the unioned table into the transformations. You will be able to see which source it came from in the
source_relation column of each model. To use this functionality, you will need to set either (note that you cannot use both) the
... config-version: 2 vars: xero_source: union_schemas: ['xero_us','xero_ca'] # use this if the data is in different schemas/datasets of the same database/project union_databases: ['xero_us','xero_ca'] # use this if the data is in different databases/projects but uses the same schema name
Disabling and Enabling Modelslink
When setting up your Xero connection in Fivetran, it is possible that not every table this package expects will be synced. This can occur because you either don’t use that functionality in Xero or have actively decided to not sync some tables. In order to disable the relevant functionality in the package, you will need to add the relevant variables.
By default, all variables are assumed to be
true. You only need to add variables for the tables you would like to disable:
config-version: 2 vars: xero__using_credit_note: false # default is true xero__using_bank_transaction: false # default is true
Don’t see a model or specific metric you would have liked to be included? Notice any bugs when installing
and running the package? If so, we highly encourage and welcome contributions to this package!
Please create issues or open PRs against
main. See the Discourse post for information on how to contribute to a package.
This package has been tested on BigQuery, Snowflake, Postgres and Redshift.
- Provide feedback on our existing dbt packages or what you’d like to see next
- Have questions, feedback, or need help? Book a time during our office hours using Calendly or email us at email@example.com
- Find all of Fivetran’s pre-built dbt packages in our dbt hub
- Learn how to orchestrate your models with Fivetran Transformations for dbt Core™
- Learn more about Fivetran overall in our docs
- Check out Fivetran’s blog
- Learn more about dbt in the dbt docs
- Check out Discourse for commonly asked questions and answers
- Join the chat on Slack for live discussions and support
- Find dbt events near you
- Check out the dbt blog for the latest news on dbt’s development and best practices