Bernardo Cortez
12/21/2021, 5:02 PM'optional_input': In(DataFrame, default_value=None)
. This works when I pass a DataFrame to the op. However, if I pass no input, it raise this error:
DagsterTypeCheckDidNotPass: Type check failed for step input "optional_input" - expected type "PySparkDataFrame". Description: Value of type <class 'NoneType'> failed type check for Dagster type PySparkDataFrame, expected value to be of Python type DataFrame.Besides, if I implement it as
'optional_input': In(Any, default_value=None)
, it would raise an error when passing a DataFrame to the op.
Can someone help me? Thanks!owen
12/21/2021, 6:18 PMIn(Any, ...)
solution? It's surprising to me that this would cause a problem. In any case, you should be able to do:
from typing import Optional
@op(ins={"optional_input": In(Optional[DataFrame], default_value=None)})
def my_op(optional_input):
...
Bernardo Cortez
12/22/2021, 1:35 PMIn(Any, ...)
solution raise the following error:
CheckError: Failure condition: Inputs of type <dagster.core.types.dagster_type._Any object at 0x7f18b6472e80> not supported. Please specify a valid type for this input either in the solid signature or on the corresponding InputDefinition.
owen
12/22/2021, 6:07 PMBernardo Cortez
12/23/2021, 12:37 PMCheckError: Failure condition: Inputs of type <dagster.core.types.dagster_type._Any object at 0x7efe99ec9e80> not supported. Please specify a valid type for this input either in the solid signature or on the corresponding InputDefinition.
owen
12/23/2021, 3:25 PMBernardo Cortez
12/27/2021, 10:00 AM