Skip to content

Commit

Permalink
updating source package
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetran-kristin committed May 22, 2020
1 parent 4610ad0 commit 3cf2a61
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This package models GitHub data from [Fivetran's connector](https://fivetran.com/docs/applications/GitHub). It uses data in the format described by [this ERD](https://docs.google.com/presentation/d/1lx6ez7-x-s-n2JCnCi3SjG4XMmx9ysNUvaNCaWc3I_I/edit).

This package is designed to do the following:
This package is designed enrich your Fivetran data by doing the following:
* Add descriptions to tables and columns that are synced using Fivetran
* Add freshness tests to source data
* Add column-level testing where applicable. For example, all primary keys are tested for uniqueness and non-null values.
Expand Down
16 changes: 15 additions & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,18 @@ require-dbt-version: [">=0.17.0", "<0.18.0"]

models:
github_source:
materialized: ephemeral
materialized: ephemeral

vars:
github_source:
issue_assignee: "{{ source('github', 'issue_assignee') }}"
issue_closed_history: "{{ source('github', 'issue_closed_history') }}"
issue_comment: "{{ source('github', 'issue_comment') }}"
issue_label: "{{ source('github', 'issue_label') }}"
issue_merged: "{{ source('github', 'issue_merged') }}"
issue: "{{ source('github', 'issue') }}"
pull_request_review: "{{ source('github', 'pull_request_review') }}"
pull_request: "{{ source('github', 'pull_request') }}"
repository: "{{ source('github', 'repository') }}"
requested_reviewer_history: "{{ source('github', 'requested_reviewer_history') }}"
user: "{{ source('github', 'user') }}"
2 changes: 1 addition & 1 deletion models/stg_github_issue.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
with issue as (

select *
from {{ source('github', 'issue') }}
from {{ var('issue') }}

), fields as (

Expand Down
2 changes: 1 addition & 1 deletion models/stg_github_issue_assignee.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
with issue_assignee as (

select *
from {{ source('github', 'issue_assignee') }}
from {{ var('issue_assignee') }}

), fields as (

Expand Down
3 changes: 1 addition & 2 deletions models/stg_github_issue_closed_history.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
with issue_closed_history as (

select *
from {{ source('github', 'issue_closed_history') }}
from {{ var('issue_closed_history') }}

), fields as (

select
issue_id,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_github_issue_comment.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
with issue_comment as (

select *
from {{ source('github', 'issue_comment') }}
from {{ var('issue_comment') }}

), fields as (

Expand Down
2 changes: 1 addition & 1 deletion models/stg_github_issue_label.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
with issue_label as (

select *
from {{ source('github', 'issue_label') }}
from {{ var('issue_label') }}

), fields as (

Expand Down
2 changes: 1 addition & 1 deletion models/stg_github_issue_merged.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
with issue_merged as (

select *
from {{ source('github', 'issue_merged') }}
from {{ var('issue_merged') }}

), fields as (

Expand Down
2 changes: 1 addition & 1 deletion models/stg_github_pull_request.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
with pull_request as (

select *
from {{ source('github', 'pull_request') }}
from {{ var('pull_request') }}

), fields as (

Expand Down
2 changes: 1 addition & 1 deletion models/stg_github_pull_request_review.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
with pull_request_review as (

select *
from {{ source('github', 'pull_request_review') }}
from {{ var('pull_request_review') }}

), fields as (

Expand Down
2 changes: 1 addition & 1 deletion models/stg_github_repository.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
with repository as (

select *
from {{ source('github', 'repository') }}
from {{ var('repository') }}

), fields as (

Expand Down
2 changes: 1 addition & 1 deletion models/stg_github_requested_reviewer_history.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
with requested_reviewer_history as (

select *
from {{ source('github', 'requested_reviewer_history') }}
from {{ var('requested_reviewer_history') }}

), fields as (

Expand Down
2 changes: 1 addition & 1 deletion models/stg_github_user.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
with github_user as (

select *
from {{ source('github', 'user') }}
from {{ var('user') }}

), fields as (

Expand Down

0 comments on commit 3cf2a61

Please sign in to comment.