Dag

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Dag(val id: String = "", val to: String = "", val schedule: String = "", val queue: String = "", val description: String = "", val dagDisplayName: String = "", val docMd: String = "", val startDate: String = "", val endDate: String = "", val dagrunTimeout: String = "", val tags: Array<String> = [], val maxActiveTasks: Int = -1, val maxActiveRuns: Int = -1, val maxConsecutiveFailedDagRuns: Int = -1, val catchup: Boolean = false, val failFast: Boolean = false, val renderTemplateAsNativeObj: Boolean = false, val disableBundleVersioning: Boolean = false, val isPausedUponCreation: Boolean = false)

Annotation to automate a Dag-builder pattern.

When applied on a class Foo, this generates a FooBuilder class with a static build method to create the Dag structure automatically.

Configuration attributes are Airflow's own Dag settings; only attributes written explicitly at the use site are applied, so Airflow's own defaults apply to everything left out.

Properties

Link copied to clipboard
val catchup: Boolean = false

Airflow's catchup setting.

Link copied to clipboard

Airflow's dag_display_name setting.

Link copied to clipboard

Airflow's dagrun_timeout setting; an ISO-8601 duration such as "PT5M".

Link copied to clipboard

Airflow's description setting.

Link copied to clipboard

Airflow's disable_bundle_versioning setting.

Link copied to clipboard

Airflow's doc_md setting.

Link copied to clipboard

Airflow's end_date setting; an ISO-8601 date-time such as "2026-01-01T00:00:00Z".

Link copied to clipboard
val failFast: Boolean = false

Airflow's fail_fast setting.

Link copied to clipboard
val id: String

Dag ID. Empty derives it from the annotated class's name.

Link copied to clipboard

Airflow's is_paused_upon_creation setting.

Link copied to clipboard

Airflow's max_active_runs setting.

Link copied to clipboard

Airflow's max_active_tasks setting.

Link copied to clipboard

Airflow's max_consecutive_failed_dag_runs setting.

Link copied to clipboard

Queue each task of the Dag runs on, unless the task sets its own queue. It cannot be blank.

Link copied to clipboard

Airflow's render_template_as_native_obj setting.

Link copied to clipboard

"@once", "@continuous", a cron expression, or empty for no schedule.

Link copied to clipboard

Airflow's start_date setting; an ISO-8601 date-time such as "2026-01-01T00:00:00Z".

Link copied to clipboard

Airflow's tags setting.

Link copied to clipboard
val to: String

Name of the generated builder class. Empty derives <Class>Builder.