https://dagster.io/ logo
Title
t

Tejas

12/23/2022, 9:41 AM
Hi there, Is there a way to materialize single asset from the asset outs distionary in dagster. For ex. I am using
multi_asset
to define the asset outs and My asset defination is
[AssetKey(['dbname', 'TABLE1']), AssetKey(['dbname', 'TABLE2']), AssetKey(['dbname', 'TABLE3']), AssetKey(['dbname', 'TABLE4'])]
But I want to select only
AssetKey(['dbname', 'TABLE2'])
. When I try to do so, getting an error
AssetsDefinition does not support subsetting
s

sandy

12/27/2022, 5:48 PM
hi Tejas - you can set
can_subset=True
on the multi-asset
t

Tejas

12/29/2022, 2:16 PM
Thanks @sandy for the solution. One more issue I am facing after adding
can_subset=True
to multiasset. I am getting an error that my OP did not fire outputs for rest of the assets.
op 'extract_load' did not fire outputs
o

owen

12/29/2022, 3:03 PM
hi @Tejas! you'll also want to set is_required=False on each of the AssetOuts
t

Tejas

12/29/2022, 3:46 PM
Thanks @owen It did work.