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

Add brand new Dagster project example to dbt quickstart #21816

Conversation

maximearmstrong
Copy link
Contributor

@maximearmstrong maximearmstrong commented May 13, 2024

Summary & Motivation

This PR updates the quickstart example for dbt + Dagster - it adds the steps to create a brand new Dagster project using the scaffold to wrap a dbt project.

This work is the continuation of #21240

How I Tested These Changes

BK
+
local

make mdx-full-format
make next-watch-build

Copy link
Contributor Author

maximearmstrong commented May 13, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @maximearmstrong and the rest of your teammates on Graphite Graphite

@maximearmstrong maximearmstrong force-pushed the maxime/ds-169/add-full-copy-pasteable-example-to-dbt-integrate-page branch from 54ed678 to 88b03c6 Compare May 13, 2024 18:43
@maximearmstrong maximearmstrong force-pushed the maxime/brand-new-project-in-dbt-quickstart branch from 095a31f to 5ff29d3 Compare May 13, 2024 18:43
@maximearmstrong maximearmstrong self-assigned this May 13, 2024
@maximearmstrong maximearmstrong marked this pull request as ready for review May 13, 2024 18:49
@graphite-app graphite-app bot added the area: docs Related to documentation in general label May 13, 2024
@maximearmstrong maximearmstrong requested review from rexledesma, erinkcochran87 and yuhan and removed request for erinkcochran87 May 13, 2024 18:49
@maximearmstrong maximearmstrong force-pushed the maxime/brand-new-project-in-dbt-quickstart branch from 5ff29d3 to 0ddd004 Compare May 13, 2024 19:07
Copy link
Member

@rexledesma rexledesma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have the opportunity to simplify the dagster-dbt project scaffold CLI by making --project-name an optional parameter. We should do this to simplify the instructions a bit.


You can create a Dagster project that wraps your dbt project by using the `dagster-dbt` command line interface.

To use the command, you'll need to provide 2 options - `--project-name`, the name of your Dagster project to be created, and `--dbt-project-dir`, the path to your dbt project. In our example, our Dagster project is named `my-dagster-project`and the relative path to our dbt project is `./my-dbt-project`, meaning that we are in the directory where `my-dbt-project` is located.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can change this so that the user only has to provide one parameter --dbt-project-dir.

We can do this by reading the user's dbt_project.yml and using the current name as the project name. Maybe event append _dagster to that dbt project name,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, if we don't provide the --project-name parameter, the user is prompted for the project name. Should we update this behaviour?

If so, could we do it in another PR? My goal here was to make the command as explicit as possible to make it easier for the user to understand.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we should do it in another PR.

Comment on lines 47 to 49
<TabItem name="Option 1: Create a brand new Dagster project">

### Option 1: Create a brand new Dagster project
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to remove a word

Suggested change
<TabItem name="Option 1: Create a brand new Dagster project">
### Option 1: Create a brand new Dagster project
<TabItem name="Option 1: Create a new Dagster project">
### Option 1: Create a new Dagster project

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 6e2bb9f

dagster-dbt project scaffold --project-name my-dagster-project --dbt-project-dir ./my-dbt-project --use-experimental-dbt-project
```

This creates a directory called `my-dagster-project/` inside the current directory. The `my-dagster-project/` directory contains a set of files that define a Dagster project.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: let's be explicit about what's happening

Suggested change
This creates a directory called `my-dagster-project/` inside the current directory. The `my-dagster-project/` directory contains a set of files that define a Dagster project.
This command creates a new directory called `my-dagster-project/` inside the current directory. The new `my-dagster-project/` directory will contain a set of files that define a Dagster project to load the dbt project provided in `./my-dbt-project`.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 6e2bb9f

@@ -41,6 +41,28 @@ The `dagster-dbt` library installs both `dbt-core` and `dagster` as dependencies

---

## Wrap your dbt project with Dagster
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we use the "wrap" lingo here, but maybe we should consolidate on "load"

Suggested change
## Wrap your dbt project with Dagster
## Load your dbt project in Dagster

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 6e2bb9f

@maximearmstrong maximearmstrong force-pushed the maxime/ds-169/add-full-copy-pasteable-example-to-dbt-integrate-page branch from c8ecf81 to f8f6482 Compare May 14, 2024 15:43
@maximearmstrong maximearmstrong force-pushed the maxime/brand-new-project-in-dbt-quickstart branch from 0ddd004 to 6e2bb9f Compare May 14, 2024 15:43
@maximearmstrong maximearmstrong force-pushed the maxime/brand-new-project-in-dbt-quickstart branch from 6e2bb9f to b75e81f Compare May 14, 2024 16:07
Copy link
Member

@rexledesma rexledesma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment, but can land after that!


You can create a Dagster project that wraps your dbt project by using the `dagster-dbt` command line interface.

To use the command, you'll need to provide 2 options - `--project-name`, the name of your Dagster project to be created, and `--dbt-project-dir`, the path to your dbt project. In our example, our Dagster project is named `my_dagster_project`and the relative path to our dbt project is `./my_dbt_project`, meaning that we are in the directory where `my_dbt_project` is located.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to explicitly call out the two options. Also nit: should spell out numbers.

Suggested change
To use the command, you'll need to provide 2 options - `--project-name`, the name of your Dagster project to be created, and `--dbt-project-dir`, the path to your dbt project. In our example, our Dagster project is named `my_dagster_project`and the relative path to our dbt project is `./my_dbt_project`, meaning that we are in the directory where `my_dbt_project` is located.
To use the command, you'll need to provide two options:
- `--project-name`, the name of your Dagster project to be created, and
- `--dbt-project-dir`, the path to your dbt project.
In our example, our Dagster project is named `my_dagster_project`and the relative path to our dbt project is `./my_dbt_project`, meaning that we are in the directory where `my_dbt_project` is located.

@maximearmstrong maximearmstrong force-pushed the maxime/ds-169/add-full-copy-pasteable-example-to-dbt-integrate-page branch from b6b450b to 170b531 Compare May 14, 2024 16:45
@maximearmstrong maximearmstrong force-pushed the maxime/brand-new-project-in-dbt-quickstart branch from b75e81f to ca9f008 Compare May 14, 2024 16:45
@maximearmstrong maximearmstrong merged commit 927bbc5 into maxime/ds-169/add-full-copy-pasteable-example-to-dbt-integrate-page May 14, 2024
1 of 3 checks passed
@maximearmstrong maximearmstrong deleted the maxime/brand-new-project-in-dbt-quickstart branch May 14, 2024 17:02
maximearmstrong added a commit that referenced this pull request May 14, 2024
## Summary & Motivation

This PR updates the quickstart example for dbt + Dagster - it adds the
steps to create a brand new Dagster project using the scaffold to wrap a
dbt project.

This work is the continuation of #21240 

## How I Tested These Changes

BK 
+
local
```
make mdx-full-format
make next-watch-build
```
maximearmstrong added a commit that referenced this pull request May 14, 2024
## Summary & Motivation

This PR updates the quickstart example for dbt + Dagster - it adds the
steps to update an existing Dagster project to wrap a dbt project.

This work is the continuation of #21240  and #21816

## How I Tested These Changes

BK 
+
local
```
make mdx-full-format
make next-watch-build
```
maximearmstrong added a commit that referenced this pull request May 16, 2024
## Summary & Motivation

This PR updates the quickstart example for dbt + Dagster - it adds the
steps to create a brand new Dagster project using the scaffold to wrap a
dbt project.

This work is the continuation of #21240 

## How I Tested These Changes

BK 
+
local
```
make mdx-full-format
make next-watch-build
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs Related to documentation in general
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants