Microsoft Power BI Operators¶
Microsoft Power BI, is a unified, scalable platform for self-service and enterprise business intelligence(BI).
Prerequisite Tasks¶
To use these operators, you must do a few things:
Create necessary resources using AZURE PORTAL or AZURE CLI.
Install API libraries via pip.
pip install 'apache-airflow[azure]'Detailed information is available Installation of Airflow®
PowerBIDatasetRefreshOperator¶
To trigger a refresh for the specified dataset from the specified workspace, use the PowerBIDatasetRefreshOperator.
    refresh_powerbi_dataset = PowerBIDatasetRefreshOperator(
        conn_id="powerbi_default",
        task_id="refresh_powerbi_dataset",
        dataset_id=DATASET_ID,
        group_id=GROUP_ID,
        check_interval=30,
        timeout=120,
        request_body={
            "type": "full",
            "retryCount": 3,
            "commitMode": "transactional",
            "notifyOption": "MailOnFailure",
        },
    )
PowerBIDatasetListOperator¶
To list all available and discoverable datasets from the specified workspace, use the PowerBIDatasetListOperator.
    get_powerbi_dataset_list = PowerBIDatasetListOperator(
        conn_id="powerbi_default",
        task_id="get_powerbi_dataset_list",
        group_id=GROUP_ID,
        timeout=120,
    )
PowerBIWorkspaceListOperator¶
To list all available and discoverable workspaces for the tenant, use the PowerBIWorkspaceListOperator.
    get_powerbi_workspace_list = PowerBIWorkspaceListOperator(
        conn_id="powerbi_default",
        task_id="get_powerbi_workspace_list",
        timeout=120,
    )
Reference¶
For further information, look at: