The `apache-airflow-microsoft-fabric-plugin` provides an operator and hook to interact with Microsoft Fabric items, such as Lakehouse, Notebook, Datafactory, and Datawarehouse, directly from Apache Airflow. It enables running Spark jobs (like notebooks) within Fabric. The current version is 1.0.3, and it is a community-driven project updated as needed.
pip install apache-airflow-microsoft-fabric-pluginVerified import paths — ran on the pinned version, not inferred.
This example DAG demonstrates how to use the `FabricRunSparkJobOperator` to execute a Microsoft Fabric Spark Notebook. Before running, configure an Airflow Connection with `Conn Id: azure_fabric_default` (or your custom ID), `Conn Type: Microsoft Fabric`, and necessary authentication details (e.g., `tenant_id`, `client_id`, `client_secret` for service principal, or `managed_identity_client_id` for Managed Identity) in its `Extra` JSON field. Replace placeholder IDs with your actual Fabric Workspace, Lakehouse (if applicable), and Notebook IDs.
When creating or editing the Airflow Connection for Microsoft Fabric, ensure you select 'Microsoft Fabric' from the 'Conn Type' dropdown in the Airflow UI.
Verify that your 'Extra' field JSON is valid and contains the correct credentials. For example: `{"tenant_id": "YOUR_TENANT_ID", "client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET"}`.Ensure your Airflow environment is running version 2.4.0 or newer. Upgrade Airflow if necessary.
Install the 'pendulum' package in your environment: `pip install pendulum`.
Ensure that Apache Airflow and its relevant provider package (e.g., `apache-airflow-providers-microsoft-fabric`) are correctly installed in your Python environment. For example, `pip install apache-airflow[microsoft.fabric]`.