airflow.providers.microsoft.azure.hooks.powerbi

Module Contents

Classes

PowerBIDatasetRefreshFields

Power BI refresh dataset details.

PowerBIDatasetRefreshStatus

Power BI refresh dataset statuses.

PowerBIHook

A async hook to interact with Power BI.

class airflow.providers.microsoft.azure.hooks.powerbi.PowerBIDatasetRefreshFields[source]

Bases: enum.Enum

Power BI refresh dataset details.

REQUEST_ID = 'request_id'[source]
STATUS = 'status'[source]
ERROR = 'error'[source]
class airflow.providers.microsoft.azure.hooks.powerbi.PowerBIDatasetRefreshStatus[source]

Power BI refresh dataset statuses.

IN_PROGRESS = 'In Progress'[source]
FAILED = 'Failed'[source]
COMPLETED = 'Completed'[source]
DISABLED = 'Disabled'[source]
TERMINAL_STATUSES[source]
exception airflow.providers.microsoft.azure.hooks.powerbi.PowerBIDatasetRefreshException[source]

Bases: airflow.exceptions.AirflowException

An exception that indicates a dataset refresh failed to complete.

class airflow.providers.microsoft.azure.hooks.powerbi.PowerBIHook(conn_id=default_conn_name, proxies=None, timeout=60 * 60 * 24 * 7, api_version=None)[source]

Bases: airflow.providers.microsoft.azure.hooks.msgraph.KiotaRequestAdapterHook

A async hook to interact with Power BI.

Parameters

conn_id (str) – The Power BI connection id.

conn_type: str = 'powerbi'[source]
conn_name_attr: str = 'conn_id'[source]
default_conn_name: str = 'powerbi_default'[source]
hook_name: str = 'Power BI'[source]
classmethod get_connection_form_widgets()[source]

Return connection widgets to add to connection form.

classmethod get_ui_field_behaviour()[source]

Return custom field behaviour.

async get_refresh_history(dataset_id, group_id)[source]

Retrieve the refresh history of the specified dataset from the given group ID.

Parameters
  • dataset_id (str) – The dataset ID.

  • group_id (str) – The workspace ID.

Returns

Dictionary containing all the refresh histories of the dataset.

Return type

list[dict[str, str]]

classmethod raw_to_refresh_details(refresh_details)[source]

Convert raw refresh details into a dictionary containing required fields.

Parameters

refresh_details (dict) – Raw object of refresh details.

async get_refresh_details_by_refresh_id(dataset_id, group_id, refresh_id)[source]

Get the refresh details of the given request Id.

Parameters

refresh_id (str) – Request Id of the Dataset refresh.

async trigger_dataset_refresh(*, dataset_id, group_id)[source]

Triggers a refresh for the specified dataset from the given group id.

Parameters
  • dataset_id (str) – The dataset id.

  • group_id (str) – The workspace id.

Returns

Request id of the dataset refresh request.

Return type

str

async cancel_dataset_refresh(dataset_id, group_id, dataset_refresh_id)[source]

Cancel the dataset refresh.

Parameters
  • dataset_id (str) – The dataset Id.

  • group_id (str) – The workspace Id.

  • dataset_refresh_id (str) – The dataset refresh Id.

Was this entry helpful?