Skip to content

vestwell/dbt_jira_source

 
 

Repository files navigation

Apache License

Jira (Source)

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

Note: This schema applies to Jira connectors set up or fully re-synced after September 10, 2020.

This package enriches your Fivetran data by doing the following:

  • Adds descriptions to tables and columns that are synced using Fivetran
  • 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

Models

This package contains staging models, designed to work simultaneously with our Jira transformation package. The staging models:

  • Remove any rows that are soft-deleted
  • Name columns consistently across all packages:
    • Boolean fields are prefixed with is_ or has_
    • Timestamps are appended with _at
    • ID primary keys are prefixed with the name of the table. For example, the issue table's ID column is renamed issue_id.
    • Foreign keys include the table that they refer to. For example, an issue's assignee user ID column is renamed assignee_user_id.

Installation Instructions

Add the following to your packages.yml file:

# packages.yml
packages:
  - package: fivetran/jira_source
    version: [">=0.4.0", "<0.5.0"]

Check dbt Hub for the latest installation instructions, or read the dbt docs for more information on installing packages.

Configuration

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

# dbt_project.yml

...
config-version: 2

vars:
    jira_database: your_database_name
    jira_schema: your_schema_name 

Disabling models

It's possible that your Jira connector does not sync every table that this package expects. If your syncs exclude certain tables, it is because you either don't use that functionality in Jira or actively excluded some tables from your syncs. To disable the corresponding functionality in the package, you must add the relevant variables. By default, all variables are assumed to be true. Add variables for only the tables you would like to disable:

# dbt_project.yml

...
config-version: 2

vars:
    jira_using_sprints: false   # Disable if you do not have the sprint table, or if you do not want sprint related metrics reported
    jira_using_components: false # Disable if you do not have the component table, or if you do not want component related metrics reported
    jira_using_versions: false # Disable if you do not have the versions table, or if you do not want versions related metrics reported

Changing the Build Schema

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

# dbt_project.yml

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

Contributions

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 Support

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

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 shoot us an email 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