https://dagster.io/ logo
#ask-ai
Title
# ask-ai
c

Christiano Christakou

02/12/2024, 3:43 PM
hey @Scout how do I specify that my op will produce no output?
s

Scout

02/12/2024, 3:43 PM
Hello! To specify that your op will produce no output, you can use the
Nothing
type provided by Dagster. This type is used to indicate that an op intentionally does not produce any output. Here's an example from the documentation on how to define an op that returns `Nothing`:
Copy code
python from dagster import op, Nothing  @op def my_op() -> Nothing:     # Your op logic here     pass  # Explicitly do nothing
In this example, the
my_op
function is decorated with
@op
and the return type is annotated as
Nothing
. This tells Dagster that the op does not produce any output. When you run this op within a job or graph, Dagster will understand that it should not expect any output from it.
4 Views