示例#1
0
文件: repo.py 项目: keyz/dagster
def hacker_news_assets_staging():
    return [
        schedule_from_partitions(download_staging_job),
        make_slack_on_failure_sensor(base_url="my_dagit_url.com"),
        make_hn_tables_updated_sensor(activity_stats_staging_job),
        make_hn_tables_updated_sensor(story_recommender_staging_job),
    ]
示例#2
0
@op(config_schema={"date": str})
def do_something_with_config(context):
    return context.op_config["date"]


@graph
def do_it_all():
    do_something_with_config()


@daily_partitioned_config(start_date="2020-01-01")
def do_it_all_config(start, _end):
    return {
        "solids": {
            "do_something_with_config": {
                "config": {
                    "date": str(start)
                }
            }
        }
    }


do_it_all_job = do_it_all.to_job(config=do_it_all_config)
do_it_all_schedule = schedule_from_partitions(do_it_all_job)


@repository
def do_it_all_repo():
    return [do_it_all_schedule]