Dataset
Apache Airflow DAG and run history datasets for AI training
An Apache Airflow dataset is a business's scheduled pipelines and the record of them running: the Python DAG files with their Git history, the dag_run and task_instance tables from the metadata database with each run's state, try number and timing, and the task logs that were kept. SourceX sources it to a buyer's spec from established businesses that run Apache Airflow, self-hosted or on a managed service. Each dataset is de-identified and licensed for an agreed permitted use. Specify that the connection and variable tables, which hold credentials, stay out.
Dataset manifest
Sourced to your spec- What it is
- The DAG repository with its commit history, dag_run and task_instance rows from the metadata database, and the task logs that survive
- Typical systems
- Apache Airflow 2 and 3, self-hosted or on Amazon MWAA, Google Cloud Composer or Astronomer, with provider packages and remote task logging
- Typical history
- Code as far back as the Git repository goes; run rows back to the last metadata cleanup; logs back to the log store's retention
- Modality
- Python source, structured run and task records, and plain-text logs
- Delivery formats
- Git bundle or file tree for DAG code, Parquet or JSONL for run and task tables, one text file per task attempt for logs
- Preparation
- Confirm the connection and variable tables are excluded and that code, logs, XComs and rendered fields were screened for secrets and data values
- Licensing
- Scoped per deployment and DAG; third-party operators, plugins and vendored code checked for who owns them
- Availability
- Sourced to your spec from businesses that run Apache Airflow; supply is not guaranteed
What a delivery contains
Fields vary by source system and are fixed per order. A typical delivery includes:
| Field | Type | What it holds |
|---|---|---|
| dag_id | string | The DAG's identifier from the dag table, carried by every dag_run and task_instance row. |
| code_ref | object | The DAG file's path in the repository and the Git commit matched to this run, flagged as recorded or inferred. |
| run_id | string | The dag_run identifier. Where Airflow generated it, the prefix shows how the run was created, such as scheduled__ or manual__. |
| run_type | enum | Scheduled, manual, backfill or triggered by a dataset or asset event, from the dag_run row. |
| logical_date | timestamp | The run's logical date from dag_run, called execution_date in older releases; not the time the run started. |
| data_interval | object | data_interval_start and data_interval_end from dag_run, the period of data the run was meant to process. |
| run_state | enum | The final state of the DAG run, success or failed. |
| task_id | string | The task's identifier within the DAG, as written in the DAG file or generated by its Python code. |
| operator | string | The operator class name stored on the task_instance row, such as BashOperator or KubernetesPodOperator. |
| map_index | integer | The index of a dynamically mapped task instance, -1 when the task is not mapped. |
| try_number | integer | The attempt count on the task_instance row. |
| task_state | enum | The task instance's last state: success, failed, upstream_failed, skipped, removed or another Airflow state. |
| timing | object | queued_dttm, start_date, end_date and duration from the task_instance row, which describe the latest attempt, with the pool the task waited in. |
| attempts | array | One entry per try with its state and log text, from task_instance_history rows where they exist and from per-attempt log files. |
Field names from the table above; values are masked placeholders.
Example record
{
"dag_id": "nightly_orders_load",
"code_ref": {
"file": "dags/orders/nightly_orders_load.py",
"commit": "9f3c2ab",
"match": "inferred_from_deploy_time"
},
"run_id": "scheduled__2024-03-05T02:00:00+00:00",
"run_type": "scheduled",
"logical_date": "2024-03-05T02:00:00Z",
"data_interval": {
"start": "2024-03-05T02:00:00Z",
"end": "2024-03-06T02:00:00Z"
},
"run_state": "success",
"task_id": "load_orders_to_warehouse",
"operator": "PythonOperator",
"map_index": -1,
"try_number": 3,
"task_state": "success",
"timing": {
"pool": "default_pool",
"queued_dttm": "2024-03-06T02:40:51Z",
"start_date": "2024-03-06T02:41:09Z",
"end_date": "2024-03-06T02:47:52Z",
"duration_s": 403.1
},
"attempts": [
{
"try": 1,
"state": "failed",
"source": "log_file",
"log_tail": "OperationalError: connection to server at [HOST] failed: timeout expired"
},
{
"try": 2,
"state": "failed",
"source": "log_file",
"log_tail": "ERROR - relation \"staging.orders_20240305\" does not exist"
},
{
"try": 3,
"state": "success",
"source": "task_instance",
"log_tail": "INFO - Marking task as SUCCESS"
}
]
}Synthetic record for illustration. Field names, structure and format are agreed per order.
What AI teams use it for
Coding agents that write and repair DAGs
DAG files with operators, retries, sensors and mapped tasks, plus the commits that fixed failures, are worked examples of pipeline engineering.
Failure diagnosis
Failed task instances joined to the log of each attempt let a model learn to tell a code bug from a late upstream file or a lost connection.
Run time and failure prediction
Years of task durations, queue times and states by schedule support models that forecast overruns and missed deadlines.
Operations agents
Retries, cleared tasks, manual triggers and backfills show what on-call engineers did after each failure.
Evaluation sets
A failed run with the code as of that commit makes a test item, scored against the fix the team later merged.
Use-case guides: Coding agents, Enterprise and computer-use agents, Private evaluation sets
What makes this data valuable
Git history spans the runs
Commits cover the same years as the run tables, with deployment times known.
Run tables not cleaned
dag_run and task_instance rows, or their archive tables, reach back to the first runs.
Logs for failed attempts
Attempt logs survive for most failures, which is where the diagnostic text is.
A row per attempt
task_instance_history rows record the tries that the main row overwrote.
Called code in the repository
SQL files, scripts and custom operators live beside the DAGs.
Secrets kept elsewhere
Credentials held in a secrets backend, so code, variables and logs carry fewer of them.
Record timeline
Apache Airflow dataset
A DAG is a Python program, and every task instance leaves a row
An Airflow pipeline is not a configuration file. It is Python that Airflow executes each time it parses the file, so tasks can be built in a loop over a list of tables or from a Variable read at parse time. With dynamic task mapping the number of copies of a task is decided at run time. The set of tasks is what the file produced when it was parsed, which reading the file does not always show. Many tasks only call something else, such as a SQL file, a dbt project or a container image, so the work may sit outside the DAG repository.
In the metadata database each run is a dag_run row with its run_id, run type, state, logical date and data interval. Each task in it is a task_instance row identified by dag_id, task_id, run_id and map_index, with the operator class, state, try_number, pool, queued, start and end times and duration. The states say more than pass or fail: upstream_failed marks a task that never ran because a task before it failed, skipped marks a branch not taken, and removed marks a task that vanished from the DAG after the run began. Lined up against the commits, years of these rows show what failed, how often a retry rescued it and which change fixed it.
Some of that record is overwritten. A task_instance row holds the latest attempt, and in older releases a retry reused the row, so earlier tries survive mostly in log files. Newer releases keep a row per try in task_instance_history. Clearing a task to rerun it sets its state back to none, so a run that reads success may have failed first. Where a schedule creates data intervals, the Airflow 2 default for cron expressions, the logical date is the start of the interval, so a daily run dated the 5th started on the 6th. Airflow 3 by default triggers a cron schedule at the logical date itself, so the column changes meaning across an upgrade, and a backfill carries old logical dates with recent start times.
The database holds states, not log text or code versions
The metadata database stores states and timestamps, not what a task printed. Log text is written where the task ran, one file per attempt, on local disk or through remote logging in object storage or a log service. How long it lasts is decided by that storage, through bucket lifecycle rules and short-lived worker containers, so logs often reach back less far than the run tables. The run tables can be short too: the airflow db clean command deletes rows older than a chosen timestamp from dag_run, task_instance, the XCom table and others, and by default moves them into archive tables.
Before Airflow 3 the database kept only the current form of each DAG, so a run row does not say which version of the file it used. Matching a run to its code means going to the Git history with the deployment times, and the match is approximate where files were copied by hand. Airflow 3 added DAG versioning, which stores each version of a DAG as it changes, and a run started from a Git DAG bundle records the commit it was created with. A bundle read from a local folder has no version to record. Templates add a wrinkle: SQL in a DAG file holds Jinja expressions, and the rendered text that ran is kept only for a set number of recent runs.
The same places hold secrets and data. The connection and variable tables store hosts, logins, passwords and API keys and should be excluded whole. XCom rows carry values passed between tasks, sometimes a file path and sometimes a result set, and logs can print rendered SQL and sample rows. To test a sample, pick failed task instances from each year, ask for the log of every try and count how many exist. For a handful of runs, ask which commit ran and how that was established.
What to check before licensing
- Have the data owner and your counsel check the terms that govern the deployment on exported data and API use: the Apache Software Foundation's license for Airflow and, for a managed service, the provider's terms.
- Confirm that the connection and variable tables are excluded entirely, and ask how DAG code was checked for hardcoded credentials.
- Ask how task logs, XCom values and rendered template fields were screened for secrets and data values.
- Ask for the first and last date in each table, whether airflow db clean or a cleanup job has run, and whether its archive tables were kept.
- Ask where task logs are stored, what the retention is, and what share of failed attempts has a log in each year.
- Ask which Airflow releases produced the history, which timetable the scheduled DAGs used, how DAGs were deployed, and how a commit was assigned to each run.
- Ask whether the SQL files, scripts, plugins and custom operators that tasks call are in the repository, and who owns any third-party code in it.
Delivery No files move before a signed license. A listing or a request grants no files by itself.
How licensing works through SourceX
- 1
Define
Send the domain, modality, volume, format, timeline and permitted use you need.
- 2
Source
SourceX identifies businesses that hold matching data and are open to licensing it.
- 3
Qualify
Fit, rights and quality are checked, and you review samples before committing.
- 4
License
Scope, permitted use, exclusivity, price and obligations are agreed in writing.
- 5
Deliver
Approved data is prepared, de-identified where required and transferred securely.
Questions Acquisition Partners ask
What does an Apache Airflow dataset contain?
It contains the pipeline code and the record of it running. The code is the DAG repository with its Git history. The record is the dag_run and task_instance tables from the metadata database and the task logs that still exist. You specify the number of DAGs and the years of run history, and supply is not guaranteed.
Can each run be matched to the exact code that ran?
Not directly before Airflow 3. Earlier releases keep only the current form of each DAG, and a run row does not record which version of the file it used. Matching relies on Git history and deployment times, and it is approximate where deployments were manual. Airflow 3 added DAG versioning, and a run from a Git DAG bundle records its commit. Ask which release produced the history and how commits were assigned to runs.
Are task logs included?
Only where they survive. Airflow's database records states and timings, and the log text is written to files, one per attempt, on local disk or in remote storage. Retention is set on that storage, so logs often reach back a shorter time than the run tables. Ask what share of failed attempts has a log, by year.
Does the run history show every retry?
Not in every release. A task instance row holds the latest attempt, with a try number that shows how many attempts were made. In older releases earlier attempts were overwritten and survive mostly in log files, while newer releases keep a row per attempt in a history table. Clearing a task to rerun it also resets its row.
How are credentials and data values kept out?
By excluding the tables that hold them and screening the rest. The connection and variable tables store hosts, logins, passwords and API keys, so confirm they were left out. Task logs, XCom values and rendered template fields can print connection strings, SQL with literal values and sample rows, so ask how they were scanned and masked. No screening method is perfect, so test the sample yourself.
Is SourceX affiliated with the Apache Software Foundation?
Apache Airflow is named to identify the system the records come from. That does not imply a partnership with or endorsement by the Apache Software Foundation. The records belong to the business that runs Apache Airflow, which licenses them under a signed agreement, and a request does not guarantee a matching dataset. Buyers should still confirm with counsel that the vendor's terms allow the intended use of exported data.
Related datasets
- Data pipeline code with run history
Pipeline and transformation code with commit history, run records, data-test results and lineage
- CI/CD pipeline logs and build failures
Pipeline runs with step logs and exit codes, joined to triggering and fixing commits
- Dagster asset definitions and run histories
A Dagster code repository with commit history, joined by asset key and run ID to run records and event log rows
- dbt project code and run artifacts
A dbt project repository with Git history: models, sources, tests, macros, seeds, snapshots and exposures, plus archived run artifacts
- Apache Kafka topic event streams
Records of chosen topics, decoded with their registered schemas, with partition, offset, timestamp, key and headers kept
Evaluating this data for procurement?
Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.
Request dataset diligenceTell us what your models need
Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.
Updated 26 November 2026.