Jacob Marcil
02/17/2023, 3:34 PMJacob Marcil
02/17/2023, 3:48 PMowen
02/17/2023, 6:33 PMowen
02/17/2023, 6:33 PMclaire
02/17/2023, 7:03 PMJacob Marcil
02/17/2023, 7:18 PM53
well In this example I have 47, but I have the same error.Jacob Marcil
02/17/2023, 7:20 PM@schedule(
cron_schedule="0 * * * *",
job=dar_multi_partition_job,
default_status=DefaultScheduleStatus.RUNNING,
)
def dar_schedule():
hour = (datetime.now() - timedelta(hours=1)).strftime("%Y-%m-%d-%H:00")
assets = ["DA3YOMC", "DA6YYNS", "DASK8KY", "DAHBT5U", "DAYT16A", "DAFB0MN", "DAU04PV", "DA05GWG", "DAY5UHJ", "DA8UISY", "DAAD2D6", "DAYK7R2", "DAEK979", "DA2Z102", "DAXVC4R", "DA14ISM", "DAYKXMG", "DAYGTPQ", "DAMFI9C", "DAD20TB", "DAEF133", "DAUY6W1", "DAMSTS2", "DAWWDPT", "DAWDCO9", "DARMN8J", "DAAFG27", "DAWPX23", "DAVTY3L", "DAWK4FA", "DA2DANE", "DAAWP08", "DARUEIM", "DAL5A0K", "DAFV08S", "DAPG1UA", "DA803TS", "DAIYNV8", "DALYJ9J", "DA4QZR7", "DAFAYJB", "DA22JZ7", "DAPV839", "DAEMBTU", "DAN0CMH", "DAWNJ9I", "DAHWGXP"]
run_requests = []
for asset in assets:
run_requests.append(dar_multi_partition_job.run_request_for_partition(partition_key=f"{asset}|{hour}", run_key=f"{asset}|{hour}"))
return run_requests
Jacob Marcil
02/17/2023, 7:21 PMJacob Marcil
02/17/2023, 7:23 PMMultiPartitionsDefinition(
{
"hour": HourlyPartitionsDefinition(start_date=datetime(2022, 12, 1)),
"asset": StaticPartitionsDefinition(
["DA3YOMC", "DA6YYNS", "DASK8KY", "DAHBT5U", "DAYT16A", "DAFB0MN", "DAU04PV", "DA05GWG", "DAY5UHJ", "DA8UISY", "DAAD2D6", "DAYK7R2", "DAEK979", "DA2Z102", "DAXVC4R", "DA14ISM", "DAYKXMG", "DAYGTPQ", "DAMFI9C", "DAD20TB", "DAEF133", "DAUY6W1", "DAMSTS2", "DAWWDPT", "DAWDCO9", "DARMN8J", "DAAFG27", "DAWPX23", "DAVTY3L", "DAWK4FA", "DA2DANE", "DAAWP08", "DARUEIM", "DAL5A0K", "DAFV08S", "DAPG1UA", "DA803TS", "DAIYNV8", "DALYJ9J", "DA4QZR7", "DAFAYJB", "DA22JZ7", "DAPV839", "DAEMBTU", "DAN0CMH", "DAWNJ9I", "DAHWGXP"],
),
}
)
Basically the same list of elements + hourly partition.claire
02/17/2023, 8:31 PMrun_request_for_partition
iterates through all the multipartitions to find the desired partition, which becomes expensive given that you have 90K partitions.
I can put out a fix for this that should improve performance, in the meantime would you mind filing an issue for this?Jacob Marcil
02/21/2023, 3:01 PM