-1

Not seeing a built in definition to partition assets by year (just hourly-monthly). Is there a way to manipulate the built in time definitions to accomplish this?

Any help is appreciated!

1 Answers1

0

You can use the TimeWindowPartitionsDefinition to create your custom time partition

from dagster import TimeWindowPartitionsDefinition

year_window_partition = TimeWindowPartitionsDefinition(
    start=dt.datetime(2023, 4, 1),
    cron_schedule="1 1 1 1 *",
    fmt="%Y"
)
guillaume latour
  • 352
  • 2
  • 18