I have an asset that is partitioned. I would like ...
# ask-community
a
I have an asset that is partitioned. I would like to create another asset that aggregates data from all of the partitions. Is there a way of defining the asset so that Dagster would pass to it something like a list of all the assets? I tried defining a second asset that is without partitions and having the first asset as an argument. I get the following error: dagster._check.CheckError: Failure condition: Tried to access partition key for asset ’AssetKey([‘asset__number_one’])’, but the number of input partitions =! 1
🤖 1
d
I think you should use
AllPartitionMapping
in the second asset's
AssetIn
If your IOManager supports loading multiple partitions (the default one and any that's based on
UPathIOManager
does) you would be able to get a dictionary with mapping between partition keys and your asset's python objects
a
Wonderful, thank you for the suggestion!
👍 1