marmotdata/airflow
Ingest metadata from Apache Airflow including DAGs, tasks, and dataset lineage
The Airflow plugin ingests metadata from Apache Airflow, including DAGs (Directed Acyclic Graphs), tasks, and dataset lineage. It connects to Airflow's REST API to discover your orchestration layer and track data dependencies through Airflow's native Dataset feature.
Prerequisites
- Airflow 2.0+ for basic DAG and task discovery
- Airflow 2.4+ for Dataset-based lineage tracking
- REST API enabled with authentication configured
Authentication
The plugin supports two authentication methods:
- Basic Auth: Username and password
- API Token: For token-based authentication
Configure authentication in your Airflow instance via airflow.cfg:
[api]
auth_backends = airflow.api.auth.backend.basic_auth
Naming
A DAG is named by its dag_id and a task by its DAG and task id, for example mrn://asset/task/airflow/etl.load. Set zone when you catalogue more than one Airflow, for example mrn://asset/pipeline/airflow@prod/etl.
Dataset URIs are turned into the asset the owning plugin catalogues. PostgreSQL and Redshift URIs (postgres://host:5432/<database>/<schema>/<table>) become <database>.<schema>.<table>, MySQL (mysql://host/<database>/<table>) becomes <database>.<table>, and BigQuery (bigquery://<project>/<dataset>/<table> or bigquery:<project>.<dataset>.<table>) becomes <project>.<dataset>.<table>. S3 and GCS stay at the bucket and Kafka at the topic. The host in the URI is passed on so Marmot can pick the zone that owns it.
In the UI
Point and click, no config file needed.
- Open Runs and choose Create pipeline.
- Pick Apache Airflow from the plugin list.
- Fill in the settings, set a schedule and save.
With the CLI
Save a YAML config, then run marmot ingest.
Not using plugins? Other ways to populate Marmot
Configuration
Fields marked Required must be set.
tagsList of textTags to apply to discovered assets
external_linksList of groupsExternal links to show on all assets
nameTextDisplay name for the link
iconTextIcon identifier for the link
urlTextURL to the external resource
filterGroup of settingsFilter discovered assets by name (regex)
includeList of textInclude patterns for resource names (regex)
excludeList of textExclude patterns for resource names (regex)
zoneTextTells this system apart from others of the same technology and becomes part of every asset's MRN
hostText RequiredAirflow webserver URL (e.g., http://localhost:8080)
usernameTextUsername for basic authentication
passwordSecretPassword for basic authentication
api_tokenSecretAPI token for authentication (alternative to basic auth)
discover_dagsYes or noDiscover Airflow DAGs as Pipeline assets
discover_tasksYes or noDiscover tasks within DAGs
discover_datasetsYes or noDiscover Airflow Datasets for lineage (requires Airflow 2.4+)
include_run_historyYes or noInclude DAG run history in metadata
run_history_daysNumberNumber of days of run history to fetch
only_activeYes or noOnly discover active (unpaused) DAGs
Assets emitted
Metadata this plugin attaches to each discovered asset.
DAG
The metadata fields Airflow emits for a DAG (Pipeline) asset.
Task
The metadata fields for a Task asset.
Dataset
The metadata fields for a Dataset asset.
DAGRun
The run facet fields emitted for DAG run history events.