https://dagster.io/ logo
#ask-community
Title
# ask-community
c

Casper Weiss Bang

07/31/2023, 1:13 PM
Yo how does observable_source_assets work with partitioning? is it a bug that the typing says it's supported? 🙂
OIC so i have to return values for ALL partitions, and cannot observe a specific partition
o

owen

07/31/2023, 5:47 PM
hi @Casper Weiss Bang! you should be able to return a
DataVersionsByPartitions
object that only maps a subset of the partitions you're working with, i.e.
Copy code
@observable_source_asset(partitions_def=DailyPartitionsDefinition(...))
def foo():
    return DataVersionsByPartitions({"2023-08-01": "12345"})
❤️ 1
f

Fabio Picchi

08/23/2023, 2:07 PM
I managed to setup my sensors this way but now I'm a bit puzzled by Dagit. I understand these only generate AssetObservations, but I guess SourceAssets can't be materialized so shouldn't these observations count as materializations? I ask because my Source Assets look as if they are not ready in Dagit since there is no materialization
o

owen

08/23/2023, 10:41 PM
Definitely a fair point there -- we have an open issue tracking this here: https://github.com/dagster-io/dagster/issues/15764
🌈 1