Skip to content

Commit

Permalink
create dummy DAG
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-connors-3 committed Jan 7, 2022
1 parent 2b4859f commit 9a44926
Show file tree
Hide file tree
Showing 35 changed files with 1,548 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# pro-serv-dag-auditing
this repo is to both test out using olivertwist and also try to develop some macros to find DAG issues automatically
This project is intended to be a dbt porject with poor DAG modeling so the professional services team can develop tools to detect these errors

### Types of DAG issues to potentially detect:

- __Direct Join to Source__: a model has a reference to both a model and a source
- __Source Fanout__: a source is used in multiple models
- __Multiple Sources Joined__: a model references more than one source
- __Rejoining of Upstream Concepts__: a circular reference is created in the DAG
Empty file added analysis/.gitkeep
Empty file.
Empty file added data/.gitkeep
Empty file.
26 changes: 26 additions & 0 deletions dbt_project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

# Name your project! Project names should contain only lowercase characters
# and underscores. A good package name should reflect your organization's
# name or the intended use of these models
name: 'pro_serv_dag_auditing'
version: '1.0.0'
config-version: 2

# This setting configures which "profile" dbt uses for this project.
profile: 'dbt-learn'

# These configurations specify where dbt should look for different types of files.
# The `source-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
source-paths: ["models"]
analysis-paths: ["analysis"]
test-paths: ["tests"]
data-paths: ["data"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]

target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
- "dbt_modules"

1,339 changes: 1,339 additions & 0 deletions logs/dbt.log

Large diffs are not rendered by default.

Empty file added macros/.gitkeep
Empty file.
2 changes: 2 additions & 0 deletions models/marts/dim_model_7.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{ ref('stg_model_2') }}
{{ ref('int_model_5') }}
1 change: 1 addition & 0 deletions models/marts/fct_model_6.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ ref('stg_model_3') }}
2 changes: 2 additions & 0 deletions models/marts/int_model_4.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{ ref('stg_model_1') }}
{{ source('source_1', 'table_2') }}
2 changes: 2 additions & 0 deletions models/marts/int_model_5.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{ ref('int_model_4') }}
{{ ref('stg_model_1') }}
1 change: 1 addition & 0 deletions models/reports/report_1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ ref('fct_model_6') }}
1 change: 1 addition & 0 deletions models/reports/report_2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ ref('fct_model_6') }}
1 change: 1 addition & 0 deletions models/reports/report_3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ ref('fct_model_6') }}
10 changes: 10 additions & 0 deletions models/staging/source.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2

sources:
- name: source_1
schema: real_schema
database: real_database
tables:
- name: table_1
- name: table_2
- name: table_3
1 change: 1 addition & 0 deletions models/staging/stg_model_1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ source('source_1', 'table_1') }}
2 changes: 2 additions & 0 deletions models/staging/stg_model_2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{ source('source_1', 'table_1') }}
{{ source('source_1', 'table_2') }}
1 change: 1 addition & 0 deletions models/staging/stg_model_3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ source('source_1', 'table_3') }}
Empty file added snapshots/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions target/catalog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"nodes": {}, "sources": {}, "generated_at": "2022-01-07T16:57:12.744824Z", "errors": ["Database Error\n 002003 (02000): SQL compilation error:\n Database 'REAL_DATABASE' does not exist or not authorized."]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
analytics.dbt_dconnors.stg_model_2
analytics.dbt_dconnors.int_model_5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
analytics.dbt_dconnors.stg_model_3
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
analytics.dbt_dconnors.stg_model_1
real_database.real_schema.table_2
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
analytics.dbt_dconnors.int_model_4
analytics.dbt_dconnors.stg_model_1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
analytics.dbt_dconnors.fct_model_6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
analytics.dbt_dconnors.fct_model_6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
analytics.dbt_dconnors.fct_model_6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
real_database.real_schema.table_1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
real_database.real_schema.table_1
real_database.real_schema.table_2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
real_database.real_schema.table_3
Binary file added target/graph.gpickle
Binary file not shown.
134 changes: 134 additions & 0 deletions target/index.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions target/manifest.json

Large diffs are not rendered by default.

Binary file added target/partial_parse.pickle
Binary file not shown.
1 change: 1 addition & 0 deletions target/run_results.json

Large diffs are not rendered by default.

Empty file added tests/.gitkeep
Empty file.

0 comments on commit 9a44926

Please sign in to comment.