How do I get the actual output value from InvokedN...
# ask-ai
j
How do I get the actual output value from InvokedNodeOutputHandle?
s
The documentation does not provide a direct answer on how to get the actual output value from an
InvokedNodeOutputHandle
. However, it does describe how to retrieve output values from job executions and in-process executions using the
output_for_node
and
output_value
methods. When you execute a job and want to retrieve the output of a specific node (op or graph), you can use the
output_for_node
method. This method requires the job execution result object to be opened as a context manager. If you attempt to use this method without the context manager, it will result in a
DagsterInvariantViolationError
. Here's a general example of how you might retrieve an output for a node:
Copy code
python
with job_result:
    output_value = job_result.output_for_node("node_name")
In this example,
job_result
is an instance of
JobExecutionResult
or
ExecuteInProcessResult
, and
"node_name"
is the name of the node whose output you want to retrieve. If you are dealing with an
InvokedNodeOutputHandle
, it typically represents the output of a node within the context of a graph or job execution. To get the actual value, you would still need to access the job execution result and use the appropriate method to retrieve the output value as shown above. If you need more specific guidance on how to work with
InvokedNodeOutputHandle
or if your use case is different, please provide additional context or check the documentation for the most relevant and up-to-date information. Dagster Docs button dagster_dbt: How to get the value from d... button Thank you for your feedback!