Yo how does observable_source_assets work with par...
# ask-community
c
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
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
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
Definitely a fair point there -- we have an open issue tracking this here: https://github.com/dagster-io/dagster/issues/15764
🌈 1