https://dagster.io/ logo
#ask-community
Title
# ask-community
g

Gowtham Manne

05/13/2022, 3:25 PM
Hi All, Good Morning. Can I know how to send parameter to job ? Thanks!
Copy code
my_job.execute_in_process()
y

yuhan

05/13/2022, 5:36 PM
Hi Gowtham, what exactly do you mean by sending parameter to job? what kind of parameter (like config or tags? )?
g

Gowtham Manne

05/13/2022, 5:44 PM
can we send custom parameters a job? My use case is I have two jobs, I want to format output of one job and send it to second job ? Can I do that is I am using above command to run the job ?
y

yuhan

05/13/2022, 5:51 PM
There are a couple of ways. A lot of users use asset sensors to manage cross dependencies where they manually materialize an asset (the output if one job in your case) which then kicks off the second job. In your case, in the second job, you can have a “read_materialization” op do that formatting, and right before “kicking off” the job (i.e. inside the asset sensor), you can send some parameter via
RunRequest(…, run_config)
to config that read op. Here’s a similar thread recently: https://dagster.slack.com/archives/C01U954MEER/p1651756747961799
g

Gowtham Manne

05/13/2022, 7:30 PM
or is it better to just use pipeline definition with dependencies instead of
Copy code
asset_sensor
??
Not sure if Pipeline definition is deprecated
y

yuhan

05/13/2022, 8:25 PM
If that’s two jobs/pipelines, the PipelineDefinition won’t support for cross-job dependencies. Alternatively, you could construct two graphs and link these two graphs in a job. Here’s the docs for nesting graphs: https://docs.dagster.io/concepts/ops-jobs-graphs/nesting-graphs. But in that case, they would be one job with two nested graphs, as opposed to two jobs.
2 Views