is there documentation somewhere for how to use `c...
# ask-community
z
is there documentation somewhere for how to use
context.asset_partition_key_range_for_output
/
context.asset_partition_time_window_for_output
to enable a partitioned asset to operate on a range of partitions? I'm currently using
context.partition_time_window
and
context.asset_partitions_time_window
and am a bit unsure of how to modify my code to use this feature
o
Hm I don't think we have any fleshed-out docs (cc @sandy) but I was under the impression that if you were using those methods (e.g.
context.asset_partitions_time_window
) then your code would already support operation on a range of partitions (you'd just need to modify your code if you were using
context.partition_key
, which assumes that there's a single partition key being materialized during any given execution)
z
ah okay, well I'll just give it a try then. when I hovered over the little ! icon next to the "Pass partition ranges to single run" it mentioned
context.asset_partition_time_window_for_output
which I hadn't seen before
hmm seems to ran into an error -
dagster._check.CheckError: Invariant failed. Description: Tried to access partition_key for a non-partitioned run
when accessing
context.partition_time_window
but we're also only on v0.15.9 so it might just be that this functionality was added after that. really need to figure out our dependency conflicts so we can update.
o
ah yeah I don't think that this feature will work until the 1.1.x era (the partition range information is passed through some new run tags so your user code won't know to read from those tags until it's updated)
z
got it, thanks!
blob salute 1