This package models Netsuite data from Fivetran’s connector. It uses data in the format described by this ERD.
This package enriches your Fivetran data by doing the following:
- Adds descriptions to tables and columns that are synced using Fivetran
- Adds freshness tests to source data
- Adds column-level testing where applicable. For example, all primary keys are tested for uniqueness and non-null values.
- Models staging tables, which will be used in our transform package
Requirementslink
A Fivetran NetSuite Analytics connector, with the following tables synced:
- accounts
- accounting_periods
- accounting_books
- consolidated_exchange_rates
- currencies
- customers
- classes
- departments
- expense_accounts
- income_accounts
- items
- locations
- partners
- transaction_lines
- transactions
- subsidiaries
- vendors
- vendor_types
Modelslink
This package contains staging models, designed to work simultaneously with our netsuite transformation package. The staging models:
- Remove any rows that are soft-deleted
- Name columns consistently across all packages:
- Boolean fields are prefixed with
is_
orhas_
- Timestamps are appended with
_at
- Columns are renamed to fit consistency of other fields. For example, the accounts accountnumber field is renamed to account_number.
- Boolean fields are prefixed with
Installation Instructionslink
Check dbt Hub for the latest installation instructions, or read the dbt docs for more information on installing packages.
Include in your packages.yml
packages:
- package: fivetran/netsuite_source
version: [">=0.4.0", "<0.5.0"]
Configurationlink
By default, this package will run using your target database and the netsuite
schema. If this is not where your netsuite data is (perhaps your netsuite schema is netsuite_fivetran
), add the following configuration to your dbt_project.yml
file:
...
vars:
netsuite_source:
netsuite_database: your_database_name
netsuite_schema: your_schema_name
Passthrough Columnslink
This package includes all source columns defined in the macros folder. To add additional columns to this package, do so using our pass-through column variables. This is extremely useful if you’d like to include custom fields to the package.
...
vars:
netsuite_source:
accounts_pass_through_columns: ['new_custom_field', 'we_can_account_for_that']
classes_pass_through_columns: ['class_is_in_session', 'pass_through_additional_fields_here']
departments_pass_through_columns: ['department_custom_fields']
transactions_pass_through_columns: ['transactions_can_be_custom','pass_this_transaction_field_on']
transaction_lines_pass_through_columns: ['transaction_lines_field']
customers_pass_through_columns: ['customers_field']
locations_pass_through_columns: ['this_new_location','lets_also_add_this_location_field']
subsidiaries_pass_through_columns: ['subsidiaries_field']
consolidated_exchange_rates_pass_through_columns: ['this_exchange_rate','that_exchange_rate']
Changing the Build Schemalink
By default this package will build the Netsuite staging models within a schema titled (<target_schema> + _stg_netsuite
) in your target database. If this is not where you would like your Netsuite staging data to be written to, add the following configuration to your dbt_project.yml
file:
...
models:
netsuite_source:
+schema: my_new_schema_name # leave blank for just the target_schema
Contributionslink
Additional contributions to this package are very welcome! Please create issues
or open PRs against main
. Check out
this post
on the best workflow for contributing to a package.
Database supportlink
This package has been tested on BigQuery, Snowflake and Redshift.
Resources:link
- 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 here or email us at solutions@fivetran.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