Mark Fickett
03/03/2022, 3:30 PMDagsterInstance
but it looks like it's for internal use. What I'm doing now is providing a wrapper like this:
def run_pipeline(...):
with tempfile.NamedTemporaryFile(mode="w", suffix=".yaml") as temp_config_file:
shared_config = {
"a_config_option": x,
"another_config_option": y,
}
yaml.dump(
{"resources": {"shared_config": {"config": shared_config}}},
temp_config_file,
)
temp_config_file.flush()
subprocess.check_call([
"dagster",
"job",
"execute",
"-m", "my.dagster_repo.module",
"-j", "my_job_name",
"-c", temp_config_file.name,
])
It would be more convenient to just call this directly in Python. Ideally including dagster.yaml
settings too would be great, so the wrapper script can set some of those options.alex
03/03/2022, 3:36 PMresult = execute_pipeline(
reconstructable(my_job_name),
instance=DagsterInstance.get(),
)
execute_job
/ launch_job
?Mark Fickett
03/03/2022, 3:42 PMexecute_pipeline
would be helpful?yuhan
06/17/2022, 7:16 PMDagster Bot
06/17/2022, 7:16 PM