The `airflow-provider-lakefs` library, currently at version 0.48.0, provides a seamless integration between Apache Airflow and lakeFS. It enables users to incorporate Git-like operations (branching, committing, merging, sensing) on data lakes directly within Airflow DAGs. The provider is actively maintained by Treeverse and follows a regular release cadence as updates to lakeFS and Airflow necessitate.
pip install airflow-provider-lakefsVerified import paths — ran on the pinned version, not inferred.
This quickstart DAG demonstrates the core capabilities of the `airflow-provider-lakefs`. It creates a new lakeFS branch, simulates data being written and committed to it, waits for a file to be present on the branch, and then merges the changes back to a `main` branch. Before running, ensure you have an Airflow connection named `lakefs_default` (or set `LAKEFS_CONN_ID` environment variable) configured as an HTTP connection pointing to your lakeFS endpoint, with `access_key_id` and `secret_access_key` in the 'Extra' field. Example `airflow connections add` command: `airflow connections add conn_lakefs --conn-type=HTTP --conn-host=http://<LAKEFS_ENDPOINT> --conn-extra='{"access_key_id":"<LAKEFS_ACCESS_KEY_ID>","secret_access_key":"<LAKEFS_SECRET_ACCESS_KEY>"}'`
Avoid using `airflow-provider-lakefs` operators directly inside TaskGroups. Instead, define them outside and manage dependencies explicitly or use a `SubDagOperator` for complex groupings if absolutely necessary, though direct operator usage is recommended.
Verify that the Airflow connection of type 'HTTP' is correctly configured with your lakeFS endpoint as `conn_host` and the `access_key_id` and `secret_access_key` in the 'Extra' JSON field, e.g., `'{"access_key_id":"<YOUR_ACCESS_KEY>","secret_access_key":"<YOUR_SECRET_KEY>"}'`. Use environment variables or Airflow Variables for sensitive credentials.Pin the `airflow-provider-lakefs` version in your `requirements.txt` (e.g., `airflow-provider-lakefs==0.48.0`) and review the project's GitHub repository or PyPI changelog for any breaking changes between specific minor versions before updating.