-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
80 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
.docusaurus | ||
.cache-loader | ||
docs/api_reference | ||
jaffle_shop | ||
|
||
# Misc | ||
.DS_Store | ||
|
Empty file.
20 changes: 20 additions & 0 deletions
20
docs/website/docs/dlt-ecosystem/transformations/dbt/dbt-snippets.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
def run_dbt_standalone_snippet() -> None: | ||
# @@@DLT_SNIPPET_START run_dbt_standalone | ||
import os | ||
|
||
from dlt.helpers.dbt import create_runner | ||
|
||
runner = create_runner( | ||
None, # use current virtual env to run dlt | ||
None, # we do not need dataset name and we do not pass any credentials in environment to dlt | ||
working_dir=".", # the package below will be cloned to current dir | ||
package_location="https://github.com/dbt-labs/jaffle_shop.git", | ||
package_profiles_dir=os.path.abspath("."), # profiles.yml must be placed in this dir | ||
package_profile_name="duckdb_dlt_dbt_test" # name of the profile | ||
) | ||
|
||
models = runner.run_all() | ||
# @@@DLT_SNIPPET_END run_dbt_standalone | ||
|
||
for m in models: | ||
print(f"Model {m.model_name} materialized in {m.time} with status {m.status} and message {m.message}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
docs/website/docs/dlt-ecosystem/transformations/dbt/profiles.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
config: | ||
# do not track usage, do not create .user.yml | ||
send_anonymous_usage_stats: False | ||
|
||
duckdb_dlt_dbt_test: | ||
target: analytics | ||
outputs: | ||
analytics: | ||
type: duckdb | ||
# schema: "{{ var('destination_dataset_name', var('source_dataset_name')) }}" | ||
path: "duckdb_dlt_dbt_test.duckdb" | ||
extensions: | ||
- httpfs | ||
- parquet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters