Partitioning ops
note
This page is specific to ops. To learn about partitioning assets, see "Partitioning assets".
When defining a job that uses ops you can partition it by supplying PartitionedConfig
object as its config.
In this guide, we'll demonstrate to use partitions with ops and jobs.
Prerequisites
Before continuing, you should be familiar with:
Relevant APIs
Name | Description |
---|---|
PartitionedConfig | Determines a set of partitions and how to generate run config for a partition. |
@dg.daily_partitioned_config | Decorator for constructing partitioned config where each partition is a date. |
@dg.hourly_partitioned_config | Decorator for constructing partitioned config where each partition is an hour of a date. |
@dg.weekly_partitioned_config | Decorator for constructing partitioned config where each partition is a week. |
@dg.monthly_partitioned_config | Decorator for constructing partitioned config where each partition is a month. |
@dg.static_partitioned_config | Decorator for constructing partitioned config for a static set of partition keys. |
@dg.dynamic_partitioned_config | Decorator for constructing partitioned config for a set of partition keys that can grow over time. |
build_schedule_from_partitioned_job | A function that constructs a schedule whose interval matches the partitioning of a partitioned job. |
Defining jobs with time partitions
The most common kind of partitioned job is a time-partitioned job - each partition is a time window, and each run for a partition processes data within that time window.