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

convert-examples-repo-to-defs cloud nux quickstart_aws #11135

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/quickstart_aws/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.dagster]
module_name = "quickstart_aws"
33 changes: 32 additions & 1 deletion examples/quickstart_aws/quickstart_aws/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,32 @@
from .repository import quickstart_aws
from dagster_aws.s3.io_manager import s3_pickle_io_manager
from dagster_aws.s3.resources import s3_resource

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),
# The AWS resources use boto under the hood, so if you are accessing your private
# buckets, you will need to provide the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
# environment variables or follow one of the other boto authentication methods.
# Read about using environment variables and secrets in Dagster:
# https://docs.dagster.io/guides/dagster/using-environment-variables-and-secrets
resources={
# With this I/O manager in place, your job runs will store data passed between assets
# on S3 in the location s3://<bucket>/dagster/storage/<asset key>.
"io_manager": s3_pickle_io_manager.configured({"s3_bucket": {"env": "S3_BUCKET"}}),
"s3": s3_resource,
},
schedules=[daily_refresh_schedule],
)
37 changes: 0 additions & 37 deletions examples/quickstart_aws/quickstart_aws/repository.py

This file was deleted.

5 changes: 5 additions & 0 deletions examples/quickstart_aws/quickstart_aws_tests/test_defs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from quickstart_aws import defs


def test_def_can_load():
assert defs.get_job_def("all_assets_job")
2 changes: 0 additions & 2 deletions examples/quickstart_aws/workspace.yaml

This file was deleted.