-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dbt integration front page edits (#14937)
## Summary & Motivation This is part of a larger set of software + docs changes for making Dagster more accessible to dbt users. This makes some edits to the front page for the dbt integration, with a few higher-level aims: - Get the value prop across ASAP - Limit Dagster-specific terminology early on that might feel overwhelming - Support different learning styles Specific changes: - Near the top, added an image & code sample of a dbt graph loaded into Dagster. - Made some tweaks to the intro text based on my understanding of what language will get across best for learning Dagster + dbt users. - Present the tutorial as one of a few different options for getting started with Dagster & dbt. When the dbt-focused Cloud NUX is ready, we can add that as another option. - Added a link to a Dagster+dbt example project. - Moved the section on how Dagster assets relate to dbt models farther down. ## How I Tested These Changes
- Loading branch information
Showing
4 changed files
with
105 additions
and
53 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
Binary file added
BIN
+748 KB
docs/next/public/images/integrations/dbt/dagster-dbt-fivetran-tensorflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
59 changes: 59 additions & 0 deletions
59
examples/docs_snippets/docs_snippets/integrations/dbt/potemkin_dag_for_cover_image.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,59 @@ | ||
"""This is used to generate the image on code snippet on the dbt front page. | ||
We pull off some dark magic so that generating the screenshot doesn't involve a whole setup with | ||
Fivetran and a database. | ||
""" | ||
|
||
from dagster import asset | ||
|
||
|
||
class dagster_fivetran: | ||
@staticmethod | ||
def build_fivetran_assets(connector_id, table_names): | ||
@asset(compute_kind="fivetran") | ||
def users(): | ||
... | ||
|
||
@asset(compute_kind="fivetran") | ||
def orders(): | ||
... | ||
|
||
return [users, orders] | ||
|
||
|
||
class dagster_dbt: | ||
@staticmethod | ||
def load_assets_from_dbt_manifest(manifest): | ||
@asset(non_argument_deps={"users"}, compute_kind="dbt") | ||
def stg_users(): | ||
"""Users with test accounts removed.""" | ||
... | ||
|
||
@asset(non_argument_deps={"orders"}, compute_kind="dbt") | ||
def stg_orders(): | ||
"""Cleaned orders table.""" | ||
... | ||
|
||
@asset(non_argument_deps={"stg_users", "stg_orders"}, compute_kind="dbt") | ||
def daily_order_summary(): | ||
"""Summary of daily orders, by user.""" | ||
raise ValueError() | ||
|
||
return [stg_users, stg_orders, daily_order_summary] | ||
|
||
|
||
# start | ||
fivetran_assets = dagster_fivetran.build_fivetran_assets( | ||
connector_id="postgres", | ||
table_names=["users", "orders"], | ||
) | ||
|
||
dbt_assets = dagster_dbt.load_assets_from_dbt_manifest("manifest.json") | ||
|
||
|
||
@asset(compute_kind="tensorflow", non_argument_deps={"daily_order_summary"}) | ||
def predicted_orders(): | ||
... | ||
|
||
|
||
# end |
959a4dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for dagster ready!
✅ Preview
https://dagster-igy27i73l-elementl.vercel.app
Built with commit 959a4dd.
This pull request is being automatically deployed with vercel-action