Son Giang
03/25/2022, 4:28 AMjamie
03/25/2022, 1:20 PM<http://GraphDefinition.to|GraphDefinition.to>_job
function. You can pass unique resource config and run config to the to_job
function. In Dagit, the jobs will get the names you provide to them in to_job
. So your code might look something like
@graph
def my_graph():
opA()
opB()
opC()
tenant1_dag = my_graph.to_job(resource_defs, run_config, ...)
tenant2_dag = my_graph.to_job(resource_defs, run_config, ...)
tenant3_dag = my_graph.to_job(resource_defs, run_config, ...)
In dagit you should see three jobs tenant1_dag
, tenant2_dag
, tenant3_dag
https://docs.dagster.io/concepts/ops-jobs-graphs/jobs-graphs#from-a-graph
https://docs.dagster.io/_apidocs/graphs#dagster.GraphDefinition.to_jobSon Giang
03/26/2022, 12:33 AM__init__.py
in jobs folder? And can it be reused from resource/config inside the op/job?
Like I have a database connection that contains both the configuration to create a job and the run config of a job.