燕子石
07/30/2023, 11:57 AMincremental refresh
. Like this case:
1. I need the scheduler run ONCE A DAY
2. The scheduler runs job which contains ASSETS that are PARTITIONED BY MONTH
3. I need the scheduler refresh the MOST RECENT TWO MONTHS of data
I've tried the build_schedule_from_partitioned_job
function - it automatically runs the job once a month because the assets are partitioned by month.
I've tried using ScheduleDefinition
- It just won't work and returned error.
Please. Any workaround?Frederik Löw
07/31/2023, 2:32 PM@schedule(job=partitioned_data_job, cron_schedule=per_asset_timer,
default_status=DefaultScheduleStatus.RUNNING)
def my_schedule(context: ScheduleEvaluationContext):
partitions = context.instance.get_dynamic_partitions(partitions_def_name="some_dynamic_partition")
for part in partitions:
yield RunRequest(run_key= part, partition_key= part)
owen
07/31/2023, 4:54 PM