Git Product home page Git Product logo

dbt_fivetran_log's Introduction

Apache License dbt Logo and Version

Fivetran Log (docs)

This package models Fivetran Log data from our free internal connector. It uses account-level data in the format described by this ERD.

This package helps you understand:

  • How you are spending money in Fivetran according to our consumption-based pricing model. We display consumption data at the table, connector, destination, and account levels.
  • How your data is flowing in Fivetran:
    • Connector health and sync statuses
    • Transformation run statuses
    • Daily API calls, schema changes, and records modified
    • Table-level details of each connector sync

The package's main goals are to:

  • Create a history of measured monthly active rows (MAR), credit consumption, and the relationship between the two
  • Enhance the connector table with sync metrics and relevant alert messages
  • Enhance the transformation table with run metrics
  • Create a history of vital daily events for each connector
  • Create an audit log of records inserted, deleted, an updated in each table during connector syncs

Note: An earlier version of this package unioned destination-level connector data to the account level. As of December 2020, the Fivetran Log now supports the creation of account-level connectors. We have removed the Fivetran Log dbt package's unioning functionality and recommend that users resync their Log connectors at the account level.

Models

model description
fivetran_log__connector_status Each record represents a connector loading data into a destination, enriched with data about the connector's data sync status.
fivetran_log__transformation_status Each record represents a transformation, enriched with data about the transformation's last sync and any tables whose new data triggers the transformation to run.
fivetran_log__mar_table_history Each record represents a table's active volume for a month, complete with data about its connector and destination.
fivetran_log__credit_mar_destination_history Each record represents a destination's consumption by showing its MAR, total credits used, and credits per millions MAR.
fivetran_log__connector_daily_events Each record represents a daily measurement of the API calls, schema changes, and record modifications made by a connector, starting from the date on which the connector was set up.
fivetran_log__schema_changelog Each record represents a schema change (altering/creating tables, creating schemas, and changing schema configurations) made to a connector and contains detailed information about the schema change event.
fivetran_log__audit_table Replaces the deprecated fivetran_audit table. Each record represents a table being written to during a connector sync. Contains timestamps related to the connector and table-level sync progress and the sum of records inserted/replaced, updated, and deleted in the table.

Installation Instructions

dbt_fivetran_log currently supports dbt 0.20.x.

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

Package Maintenance

The Fivetran team maintaining this package only maintains the latest version. We highly recommend you keep your packages.yml updated with the dbt hub latest version. You may refer to the CHANGELOG and release notes for more information on changes across versions.

Configuration

By default, this package will run using your target database and the fivetran_log schema. If this is not where your Fivetran Log data is, add the following configuration to your dbt_project.yml file:

# dbt_project.yml

...
config-version: 2

vars:
  fivetran_log:
    fivetran_log_database: your_database_name
    fivetran_log_schema: your_schema_name 

Disabling Transformation Models

If you have never created Fivetran-orchestrated basic SQL transformations, your source data will not contain the transformation and trigger_table tables. Moreover, if you have only created scheduled basic transformations that are not triggered by table syncs, your source data will not contain the trigger_table table (though it will contain transformation).

To disable the corresponding functionality in the package, you must add the following variable(s) to your dbt_project.yml file. By default, all variables are assumed to be true:

# dbt_project.yml

...
config-version: 2

vars:
  fivetran_log:
    fivetran_log_using_transformations: false # this will disable all transformation + trigger_table logic
    fivetran_log_using_triggers: false # this will disable only trigger_table logic 

Disabling Fivetran Error and Warning Messages

Some users may wish to exclude Fivetran error and warnings messages from the final fivetran_log__connector_status model due to the length of the message. To disable the errors_since_last_completed_sync and warnings_since_last_completed_sync fields from the final model you may add the following variable to you to your dbt_project.yml file. By default, this variable is assumed to be true:

# dbt_project.yml

...
config-version: 2

vars:
  fivetran_log:
    fivetran_log_using_sync_alert_messages: false # this will disable only the sync alert messages within the connector status model

Changing the Build Schema

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

# dbt_project.yml

...
models:
  fivetran_log:
    +schema: my_new_final_models_schema # leave blank for just the target_schema
    staging:
      +schema: my_new_staging_models_schema # leave blank for just the target_schema

Read more about using custom schemas in dbt here.

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. See the Discourse post for information on how to contribute to a package.

Database Support

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

Resources:

dbt_fivetran_log's People

Contributors

fivetran-jamie avatar fivetran-joemarkiewicz avatar fivetran-chloe avatar kristin-bagnall avatar b-luu 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.