/dbt_github

Fivetran's GitHub dbt package

Apache License 2.0Apache-2.0

GitHub (Docs)

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

This package enables you to better understand your GitHub issues and pull requests. Its main focus is to enhance these two core objects with commonly used metrics. Additionally, the metrics tables let you better understand your team's velocity over time. These metrics are available on a daily, weekly, monthly and quarterly level.

Models

This package contains transformation models, designed to work simultaneously with our GitHub 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
github__issues Each record represents a GitHub issue, enriched with data about its assignees, milestones, and time comparisons.
github__pull_requests Each record represents a GitHub pull request, enriched with data about its repository, reviewers, and durations between review requests, merges and reviews.
github__daily_metrics Each record represents a single day, enriched with metrics about PRs and issues that were created and closed during that period.
github__weekly_metrics Each record represents a single week, enriched with metrics about PRs and issues that were created and closed during that period.
github__monthly_metrics Each record represents a single month, enriched with metrics about PRs and issues that were created and closed during that period.
github__quarterly_metrics Each record represents a single quarter, enriched with metrics about PRs and issues that were created and closed during that period.

Installation Instructions

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

Configuration

By default, this package will look for your GitHub data in the github schema of your target database. If this is not where your GitHub data is (perhaps your GitHub schema is github_fivetran), add the following configuration to your dbt_project.yml file:

# dbt_project.yml

...
config-version: 2

vars:
  github_source:
    github_database: your_database_name
    github_schema: your_schema_name 

Database support

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

Contributions

Additional contributions to this package are very welcome! Please create issues or open PRs against master. Check out this post on the best workflow for contributing to a package.

Resources: