is there a way to set the `io_manager_key` for gra...
# ask-community
d
is there a way to set the
io_manager_key
for graph backed assets or `multi_asset`s?
I found the answer:
@multi_asset(outs = {'asset_name': Out(io_manager_key = my_io_manager)})
o
yep that's correct -- just a heads up that passing regular
Out
objects to the
outs
parameter is deprecated (it should be
AssetOut
instead)
d
Ah cool, good to know
a
@owen may I ask how to specify partitions for multi-assets?
Copy code
@multi_asset(
    partitions_def=daily_partitions,
    required_resource_keys={"my_client"},
    outs={
        "asset1": AssetOut(
            io_manager_key="json_io_manager",
            key_prefix=["raw"],
        ),
        "asset2": AssetOut(
            io_manager_key="json_io_manager",
            key_prefix=["raw"],
        ),
    }
)
When I materialize this, I got the error msg:
Copy code
ValueError: Tried to get asset partitions for an output that does not correspond to a partitioned asset.