Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework sources to be dbt models rather than manually created #188

Merged
merged 19 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci_test_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR

- name: Install Python packages
run: python -m pip install dbt-snowflake~=1.1.0 sqlfluff-templater-dbt
run: python -m pip install dbt-snowflake~=1.2.0 sqlfluff-templater-dbt

- name: Test database connection
run: dbt debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main_test_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
uses: actions/checkout@v2

- name: Install Python packages
run: python -m pip install dbt-snowflake~=1.1.0 sqlfluff-templater-dbt
run: python -m pip install dbt-snowflake~=1.2.0 sqlfluff-templater-dbt

- name: Test database connection
run: dbt debug
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Pipfile.lock
env.sh

.python_version
.vscode
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,18 @@ packages:

## Configuration

The following configuration can be used to specify where the raw data is uploaded, and where the dbt models are created:
The following configuration can be used to specify where the raw (sources) data is uploaded, and where the dbt models are created:

```yml
vars:
dbt_artifacts_database: your_db # optional, default is your target database
dbt_artifacts_schema: your_schema # optional, default is your target schema
dbt_artifacts_create_schema: true|false # optional, set to false if you don't have privileges to create schema, default is true

models:
...
dbt_artifacts:
+schema: your_destination_schema # optional, default is your target database
staging:
+schema: your_destination_schema # optional, default is your target schema
sources:
+database: your_sources_database # optional, default is your target database
+schema: your sources_database # optional, default is your target schema
jaypeedevlin marked this conversation as resolved.
Show resolved Hide resolved
NiallRees marked this conversation as resolved.
Show resolved Hide resolved
...
```

Expand Down
5 changes: 4 additions & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 'dbt_artifacts'
version: '1.2.0'
config-version: 2
require-dbt-version: ">=1.0.0"
require-dbt-version: ">=1.2.0"
jaypeedevlin marked this conversation as resolved.
Show resolved Hide resolved
profile: "dbt_artifacts"

clean-targets: # folders to be removed by `dbt clean`
Expand All @@ -13,3 +13,6 @@ models:
dbt_artifacts:
+materialized: view
+file_format: delta
sources:
+materialized: incremental
+on_schema_change: append_new_columns
45 changes: 0 additions & 45 deletions macros/create_dbt_artifacts_tables.sql

This file was deleted.

86 changes: 0 additions & 86 deletions macros/create_exposures_table_if_not_exists.sql

This file was deleted.

106 changes: 0 additions & 106 deletions macros/create_invocations_table_if_not_exists.sql

This file was deleted.

91 changes: 0 additions & 91 deletions macros/create_model_executions_table_if_not_exists.sql

This file was deleted.

Loading