Skip to content

Commit

Permalink
[Docs] Fix automating-assets-schedules-jobs (#24204)
Browse files Browse the repository at this point in the history
## Summary & Motivation

The documentation at
https://docs.dagster.io/concepts/automation/schedules/automating-assets-schedules-jobs
is incomplete with `define_asset_job` and `ScheduleDefinition` missing
from the step 3 code summary.

## How I Tested These Changes

N/A

## Changelog [New | Bug | Docs]

NOCHANGELOG
  • Loading branch information
X-Guardian authored Sep 4, 2024
1 parent 021ee7e commit 5aacf74
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Let's assume we already have a few assets in our project in a group named `ecomm
def orders_asset():
return 1


@asset(group_name="ecommerce_assets")
def users_asset():
return 2
Expand Down Expand Up @@ -115,24 +114,25 @@ from dagster import (
def orders_asset():
return 1


@asset(group_name="ecommerce_assets")
def users_asset():
return 2

ecommerce_job = define_asset_job(
"ecommerce_job", AssetSelection.groups("ecommerce_assets")
)

ecommerce_schedule = ScheduleDefinition(
job=ecommerce_job,
cron_schedule="15 5 * * 1-5",
default_status=DefaultScheduleStatus.RUNNING,
)

# end_job


# start_schedule


# start_definitions
defs = Definitions(
assets=[orders_asset, users_asset],
jobs=[ecommerce_job],
schedules=[ecommerce_schedule],
)
```

---
Expand Down

1 comment on commit 5aacf74

@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-rm10mc30v-elementl.vercel.app
https://master.dagster.dagster-docs.io

Built with commit 5aacf74.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.