Skip to content

Commit

Permalink
[docs] dagster essentials - fixes relative partitions import for taxi…
Browse files Browse the repository at this point in the history
… trips (#18132)

## Summary & Motivation

Imports of `monthly_partition` should use `..partitions` to import the
`monthly_partitions` object.

Without this, the following error is thrown:

```
The above exception was caused by the following exception:
ModuleNotFoundError: No module named 'dagster_university.assets.partitions'
```

Cheers!

## How I Tested These Changes

Viewed rendered markdown in web browser.
  • Loading branch information
cmpadden authored Nov 21, 2023
1 parent aff4907 commit 4d61e67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ To add the partition to the asset:
After following the steps above, the `taxi_trips_file` asset should look similar to the code snippet below:

```python
from .partitions import monthly_partition
from ..partitions import monthly_partition

@asset(
partitions_def=monthly_partition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The updated asset should look similar to the following code. Click **View answer

```python {% obfuscated="true" %}
from dagster import asset
from .partitions import monthly_partitions
from ..partitions import monthly_partitions

@asset(
deps=["taxi_trips_file"],
Expand Down

1 comment on commit 4d61e67

@github-actions
Copy link

Choose a reason for hiding this comment

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

Deploy preview for dagster-docs ready!

✅ Preview
https://dagster-docs-53o5x4297-elementl.vercel.app
https://master.dagster.dagster-docs.io

Built with commit 4d61e67.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.