I would like to have the ability not to skip singl...
# dagster-feedback
d
I would like to have the ability not to skip single-input ops following
is_required=False
outputs when they haven't been produced. My op has an
Optional[...]
typing and handles the case of a missing input in a special way. I still want it to run even if the input wasn't provided. This is possible if another input is provided, so I have to make a dummy input to achieve this behavior. It would be nice if this would be possible without this hack (maybe an argument in the
op
decorator?).
o
hi @Daniel Gafni! Just to confirm, you want to be able to distinguish between: • Some real value was produced • Some value was produced, and that value was
None
• No value was produced at all Is that correct? Not that this is significantly better, but it'd also be possible to do something like:
Copy code
class _NoData():
    pass

@op
def foo(input: Union[int, None, _NoData]):
    if not data_exists:
        return _NoData()
    else:
        return get_data() # can return None or int
d
Hey Owen! Not exactly. I just want to always execute the next op even if the previous didn't return anything. The workaround you suggested requires the
IOManager
to support
None
objects (which I had to do in
dagster-polars
for this exact reason), which is not ideal