Area: Ingestion Issues
Sub-Area: Airflow Plugin Compatibility
Issue
When using the DataHub Airflow plugin with Airflow 2.x deployments (including managed Airflow environments such as Astronomer Astro), the Open in Airflow button in the DataHub UI generates a malformed or incorrect URL. Instead of navigating to the correct Airflow 2.x DAG view (e.g., /dags/<dag_id>/grid), the link is constructed using the legacy Airflow 1.x URL pattern (e.g., /tree?dag_id=... or simply /tree), resulting in a broken or 404 link when clicked.
Error Messages
-
404 Not Foundwhen clicking the "Open in Airflow" button - Generated URL ends in
/treeinstead of/dags/<dag_id>/grid
You Might Be Asking
- Why does the "Open in Airflow" button generate a URL ending in
/treeinstead of the correct Airflow 2.x DAG path? - Why is the Airflow link in DataHub pointing to the wrong page or returning a 404 error on Airflow 2.x?
- Does the Astronomer Astro URL format (e.g.,
<deployment-id>.<region>.astronomer.run/<workspace-id>/) affect how DataHub constructs the Airflow link?
Solution
This issue is caused by an outdated version of the acryl-datahub-airflow-plugin that uses the legacy Airflow 1.x URL path format. Upgrading the plugin to a current version resolves the issue by generating URLs compatible with the Airflow 2.x DAG grid view.
-
Check your currently installed plugin version:
pip show acryl-datahub-airflow-pluginIf the installed version is older (e.g.,
1.3.0), it uses the legacy/treeURL format which is incompatible with Airflow 2.x. -
Upgrade the plugin to the latest supported version:
pip install "acryl-datahub-airflow-plugin[airflow2]" --upgradeAs of the time of this writing, version
1.6.0or later includes the corrected Airflow 2.x URL format. Verify the installed version after upgrading:pip show acryl-datahub-airflow-plugin -
Restart your Airflow environment to apply the plugin changes. Trigger a DAG run or re-ingest metadata to DataHub, then verify that the Open in Airflow button generates a URL in the correct format:
https://<your-airflow-base-url>/dags/<dag_id>/grid -
Confirm your Airflow base URL is correctly configured in the DataHub plugin settings. The base URL should match your Airflow deployment's actual root URL without any trailing path components:
# Example DataHub Airflow plugin configuration (datahub_airflow_plugin.cfg or environment variable) AIRFLOW__DATAHUB__DATAHUB_CONN_ID=datahub_rest # Ensure the Airflow webserver base URL is correctly set in Airflow itself: AIRFLOW__WEBSERVER__BASE_URL=https://<your-airflow-base-url>
Additional Notes
- The legacy
/tree?dag_id=...endpoint was removed in Airflow 2.x and replaced with/dags/<dag_id>/grid. Any plugin version that predates this change will produce broken links on Airflow 2.x deployments. - For managed Airflow environments such as Astronomer Astro, the base URL may include region and workspace identifiers (e.g.,
<deployment-id>.<region>.astronomer.run/<workspace-id>). This is expected and does not itself cause the URL formatting issue — the root cause is the legacy path suffix generated by the outdated plugin. - Support for Airflow 1.x has been discontinued. If you are running Airflow 1.x, you will need to upgrade to Airflow 2.x or later to receive continued plugin support and correct URL generation.
- If you are running Airflow 3.x, ensure you are using a plugin version that explicitly supports Airflow 3.x, as the
[airflow2]extras variant may not be applicable.
Related Documentation
- DataHub Airflow Plugin Overview
- Airflow Plugin Installation and Configuration
- DataHub Cloud Overview
Tags: airflow, airflow-plugin, open-in-airflow, airflow-2x, url-format, acryl-datahub-airflow-plugin, astronomer, dag-link, plugin-upgrade, lineage