Lihao Yu
01/20/2023, 11:06 PM@job(
resource_defs={
"news_loader": news_loader,
"start_date": make_values_resource(),
"end_date": make_values_resource(),
},
)
def daily_data_download_job():
daily_data_download_graph.to_job(resource_defs={"news_loader": news_loader,
"start_date": make_values_resource(),
"end_date": make_values_resource()})
In my job, is there a way to pass the start_date
from resource_defs to the argument of to_job()
? I try to use context, but it seems like context is not supported by job.chris
01/21/2023, 12:17 AM<http://daily_data_download_graph.to|daily_data_download_graph.to>_job
within daily_data_download_job
? If so, that’s incorrect syntax. All you should need to do is create the job from the graph like you are doing in the call to to_job. This is all you should need:
my_job = daily_data_download_graph.to_job(resource_defs={"news_loader": news_loader,
"start_date": make_values_resource(),
"end_date": make_values_resource()})
Lihao Yu
01/25/2023, 3:36 PM