Skip to main content

Datahub Airflow Plugin

Capabilities

DataHub supports integration of

  • Airflow Pipeline (DAG) metadata
  • DAG and Task run information
  • Lineage information when present

Installation

  1. You need to install the required dependency in your airflow.
  pip install acryl-datahub-airflow-plugin
  1. Disable lazy plugin load in your airflow.cfg
core.lazy_load_plugins : False
  1. You must configure an Airflow hook for Datahub. We support both a Datahub REST hook and a Kafka-based hook, but you only need one.

    # For REST-based:
    airflow connections add  --conn-type 'datahub_rest' 'datahub_rest_default' --conn-host 'http://localhost:8080'
    # For Kafka-based (standard Kafka sink config can be passed via extras):
    airflow connections add  --conn-type 'datahub_kafka' 'datahub_kafka_default' --conn-host 'broker:9092' --conn-extra '{}'
    
  2. Add your datahub_conn_id and/or cluster to your airflow.cfg file if it is not align with the default values. See configuration parameters below

    Configuration options:

    Name Default value Description
    datahub.datahub_conn_id datahub_rest_deafault The name of the datahub connection you set in step 1.
    datahub.cluster prod name of the airflow cluster
    datahub.capture_ownership_info true If true, the owners field of the DAG will be capture as a DataHub corpuser.
    datahub.capture_tags_info true If true, the tags field of the DAG will be captured as DataHub tags.
    datahub.graceful_exceptions true If set to true, most runtime errors in the lineage backend will be suppressed and will not cause the overall task to fail. Note that configuration issues will still throw exceptions.
  3. Configure inlets and outlets for your Airflow operators. For reference, look at the sample DAG in lineage_backend_demo.py, or reference lineage_backend_taskflow_demo.py if you're using the TaskFlow API.

  4. [optional] Learn more about Airflow lineage, including shorthand notation and some automation.

How to validate installation

  1. Go and check in Airflow at Admin -> Plugins menu if you can see the Datahub plugin
  2. Run an Airflow DAG and you should see in the task logs Datahub releated log messages like:
Emitting Datahub ...

Additional references

Related Datahub videos: Airflow Lineage Airflow Run History in DataHub

Metadata

Release files for treff7es-datahub-airflow-plugin 0.0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for treff7es-datahub-airflow-plugin 0.0.0.3
File Size Uploaded
treff7es-datahub-airflow-plugin-0.0.0.3.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for treff7es-datahub-airflow-plugin 0.0.0.3
File Interpreter ABI Platform
treff7es_datahub_airflow_plugin-0.0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 16.6 kB

Release files / treff7es-datahub-airflow-plugin-0.0.0.3.tar.gz

Download URL treff7es-datahub-airflow-plugin-0.0.0.3.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e134adb92244840e617763e2ba4bbf870704c60195942a6f6b4595f28aa23314
BLAKE2b-256 checksum
How to use checksums
30096d1a1bc0be5c80f029dd721edfba938bae56be3c5bf971ea8c63f5621899
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.10

Release files / treff7es_datahub_airflow_plugin-0.0.0.3-py3-none-any.whl

Download URL treff7es_datahub_airflow_plugin-0.0.0.3-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8683ffdfb14f84e9b76d29e42a116df94459bbd4d5b83b2a0adde32ed16d8c8d
BLAKE2b-256 checksum
How to use checksums
fdcf9d3e6d5d963b292ddafbb886771c640273a4d633cc7f6a55ca99ac4f658d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.10

Release history Release notifications | RSS feed

This release

0.0.0.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page