Hi All, Good Morning. Can I know how to send param...
# ask-community
g
Hi All, Good Morning. Can I know how to send parameter to job ? Thanks!
Copy code
my_job.execute_in_process()
y
Hi Gowtham, what exactly do you mean by sending parameter to job? what kind of parameter (like config or tags? )?
g
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
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
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
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.