Hey I’m trying to configure a `multi_asset` with p...
# dagster-serverless
j
Hey I’m trying to configure a
multi_asset
with partitions and I can’t find where I could configure the partitions for
outs
. I thought that they would take the
partition_def
from the
multi_asset
but it seems like they are not. I’m always receiving the following error.
Copy code
dagster._check.CheckError: Failure condition: The output has no asset partitions
Here a snipper of the configuration of my
multi_asset
Copy code
@multi_asset(
    partitions_def=hourly_partitions,
    op_tags={"kind": "s3"},
    required_resource_keys={"aws_secrets"},
    retry_policy=default_retry_policy,
    outs={
        "found": AssetOut(
            is_required=False,
            metadata={"priority": "high"},
            io_manager_key="io_manager",
        ),
        "not_found": AssetOut(
            is_required=False,
            metadata={"priority": "low"},
            io_manager_key="io_manager",
        ),
    },
)
def do_things(context):
    json_response = {'what_ever':3}
    if "tokens_found" in context.selected_output_names:
        yield Output(value=json_response, output_name="found")
    if "tokens_not_found" in context.selected_output_names:
        yield Output(value=json_response, output_name="not_found")
Is there a way I can add a
partition_Def
in the
Output()
?
Oh well, found it. I was using
context.asset_partition_key_for_output
and it seems like this is not accessible in a
multi_asset
. Damm that was hard to find ahah. 🙂