Drew You
03/21/2023, 7:04 PMIOManager
. Here's my current implementation:
if context.has_partition_key:
had_it = False
try:
had_it = context.asset_partitions_time_window
except:
pass
if had_it:
raise NotImplementedError(
"Time partitioning not implemented in IO Manager"
)
Is there any way to check if the asset is time window partitioned without a try except block?jamie
03/21/2023, 8:03 PMisinstance
checks
if context.has_asset_partitions:
if isinstance(context.asset_partitions_def, MultiPartitionsDefinition):
# handle multi partition case
elif isinstance(context.asset_partitions_def, TimeWindowPartitionsDefinition):
# handle time partitions case
else:
# handle static partition case