Andras Somi01/22/2023, 2:19 PM
that saves the output of a partitioned asset and behaves nicely if a non-partitioned downstream asset asks for the output (it should return the latest available partition), but I got a bit lost on what to look for in the
object. I tried to decipher the relevant methods on
but couldn’t really grasp what’s going on with the partition keys (comments are confusing for me, I even sense some typos there, but cannot be sure…). How should I decide whether the downstream asset is partitioned so
should return the specific partition or non-partitioned therefore
should return the latest available?
. I ended up having something like this in
Is this how it should be done?
if context.has_partition_key: # Asking for a specific partition date_str = context.partition_key # ... retrieve output for this key else: # Asking for latest partition # ... check all available partitions and retrieve latest
yuhan01/28/2023, 1:49 AM
Andras Somi01/28/2023, 7:19 AM