Is there anyway to get the `job_def` or `executor_...
# ask-community
m
Is there anyway to get the
job_def
or
executor_def
of a job from either
DagsterRun
or
DagsterInstance
? I can't find a way in the documentation.
j
i think you should be able to do
context.job_def
in your asset/op. let me know if that doesnt work
m
i don't have access to the
OpExecutionContext
in this flow - we're monkey patching datadog internals and this is function is a hook into job launching. unless I can get from
DagsterRun
->
OpExecutionContext
somehow.
j
oh i see. in that case i’m not sure. I dug into those two classes a bit and i don’t see anything that will get you there directly. you might be able to combine some things though. for example you can get the job name from DagsterRun and you might be able to get the definition from the instance using the name (not sure id that’s possible though)