def my_solid(_): yield Output(5, "output1") yield Output(7, "output2")
async def aio_gen(): await asyncio.sleep(0.01) yield Output("done")
def yield_val(_context): yield Output("val")
def yield_values(_context): yield Output(1, "num_1") yield Output(2, "num_2") yield Output(None, "complete")
def bad(_context): yield Output("oops")
def yield_none(_context): yield Output(None)
def can_fail(context, inp): # pylint: disable=unused-argument if context.solid_config["fail"]: raise Exception("blah") yield Output("okay perfect", "start_fail")
def multi(_): yield Output("okay perfect", "success")
def tag_asset_solid(_): yield AssetMaterialization(asset_key="a", tags={"foo": "FOO"}) yield Output(1)
def _solid(_, _in1): yield Output(1)
def solid_partitioned_asset(_): yield AssetMaterialization(asset_key="a", partition="partition_1") yield Output(1)
def solid_asset_b(_, num): yield AssetMaterialization(asset_key="b") time.sleep(0.1) yield AssetMaterialization(asset_key="c") yield Output(num)
def solid_asset_a(_): yield AssetMaterialization(asset_key="a") yield Output(1)
def df_expectations_solid(_context, sum_df): yield ExpectationResult(label="some_expectation", success=True) yield ExpectationResult(label="other_expectation", success=True) yield Output(sum_df)
def optional_only_one(_context): # pylint: disable=unused-argument yield Output(output_name="output_one", value=1)