GithubHelp home page GithubHelp logo

bill-he / dbt_netsuite Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fivetran/dbt_netsuite

0.0 0.0 0.0 1004 KB

Data models for Fivetran's Netsuite connector, built using dbt.

Home Page: https://fivetran.github.io/dbt_netsuite/

License: Apache License 2.0

dbt_netsuite's Introduction

Apache License

Netsuite (docs)

This package models Netsuite data from Fivetran's connector. It uses data in the format described by this ERD.

The main focus of this package is to enable users to insights into their netsuite data that can be used for financial statement reporting and deeper transactional analysis. This is acheived by the following:

  • Recreating both the balance sheet and income statement
  • Recreating commonly used data by using the transaction lines as the base table and joining other data

Models

This package contains transformation models, designed to work simultaneously with our netsuite source package. A dependency on the source package is declared in this package's packages.yml file, so it will automatically download when you run dbt deps. The primary outputs of this package are described below. Intermediate models are used to create these output models.

model description
netsuite__balance_sheet All lines necessary to generate a balance sheet (converted for the appropriate exchange rate of the parent subsidiary). Non balance sheet transactions are categorized as either Retained Earnings or Net Income.
netsuite__income_statement All lines necessary to generate an income statement (converted for the appropriate exchange rate of the parent subsidiary). Department, class, and location information are included for additional reporting functionality.
netsuite__transaction_details All transactions with the associated accounting period, account and subsidiary information. Where applicable, you can also see data about the customer, location, item, vendor, and department.

Installation Instructions

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
    version: [">=0.5.0", "<0.6.0"]

Configuration

By default, this package looks for your netsuite data in the netsuite schema of your target database. If this is not where your netsuite data is, add the below configuration to your dbt_project.yml file.

# dbt_project.yml

...
config-version: 2

vars:
    netsuite_database: your_database_name
    netsuite_schema: your_schema_name

This package allows users to add additional columns to the final model tables. Columns passed through must be present in the downstream source tables. See below for an example of how the passthrough columns should be configured within your dbt_project.yml file.

# dbt_project.yml

...
vars:
  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']

Additionally, this package allows users to pass columns from the netsuite__transaction_details table into the netsuite__balance_sheet and netsuite__income_statement tables. See below for an example of how to passthrough transaction detail columns into the respective balance sheet and income statement final tables within your dbt_project.yml file.

# dbt_project.yml

...
vars:
  netsuite:
    balance_sheet_transaction_detail_columns: ['company_name','vendor_name']
    income_statement_transaction_detail_columns: ['is_account_intercompany','location_name']

Changing the Build Schema

By default this package will build the Netsuite staging models within a schema titled (<target_schema> + _stg_netsuite) and the Netsuite final models with a schema titled (<target_schema> + _netsuite) in your target database. If this is not where you would like your modeled Netsuite data to be written to, add the following configuration to your dbt_project.yml file:

# dbt_project.yml 

...
models:
  netsuite:
    +schema: my_new_schema_name # leave blank for just the target_schema
  netsuite_source:
    +schema: my_new_schema_name # leave blank for just the target_schema

Contributions

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. Check out this post on the best workflow for contributing to a package.

Database Support

This package has been tested on BigQuery, Snowflake and Redshift.

Resources:

  • Provide feedback on our existing dbt packages or what you'd like to see next
  • Have questions or feedback, or need help? Book a time during our office hours here or email us at [email protected]
  • Find all of Fivetran's pre-built dbt packages in our dbt hub
  • Learn how to orchestrate dbt transformations with Fivetran here
  • 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

dbt_netsuite's People

Contributors

fivetran-joemarkiewicz avatar kristin-bagnall avatar fivetran-sheringuyen avatar clrcrl avatar dylanbaker avatar fivetran-reneeli avatar fivetran-chloe avatar norina-sun avatar albertgozzi avatar mdimercurio avatar cccran avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.