Skip to content

Commit

Permalink
Move Definitions to definitions.py
Browse files Browse the repository at this point in the history
Move Definitions to definitions.py
  • Loading branch information
maximearmstrong authored Jul 22, 2024
2 parents 4f432b9 + d6ae0e0 commit fe73a19
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion dagster_cloud.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
locations:
- location_name: quickstart_etl
code_source:
package_name: quickstart_etl
package_name: quickstart_etl.definitions
build:
directory: ./
registry: <account-id>.dkr.ecr.us-west-2.amazonaws.com/<image-name>
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.dagster]
module_name = "quickstart_etl"
module_name = "quickstart_etl.definitions"
code_location_name = "quickstart_etl"
16 changes: 0 additions & 16 deletions quickstart_etl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +0,0 @@
from dagster import (
Definitions,
ScheduleDefinition,
define_asset_job,
load_assets_from_package_module,
)

from . import assets

daily_refresh_schedule = ScheduleDefinition(
job=define_asset_job(name="all_assets_job"), cron_schedule="0 0 * * *"
)

defs = Definitions(
assets=load_assets_from_package_module(assets), schedules=[daily_refresh_schedule]
)
16 changes: 16 additions & 0 deletions quickstart_etl/definitions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from dagster import (
Definitions,
ScheduleDefinition,
define_asset_job,
load_assets_from_package_module,
)

from . import assets

daily_refresh_schedule = ScheduleDefinition(
job=define_asset_job(name="all_assets_job"), cron_schedule="0 0 * * *"
)

defs = Definitions(
assets=load_assets_from_package_module(assets), schedules=[daily_refresh_schedule]
)

0 comments on commit fe73a19

Please sign in to comment.