airflow.providers.microsoft.azure.hooks.analysis_services

Attributes

TOKEN_SCOPE

RefreshType

VALID_REFRESH_TYPES

Exceptions

AzureAnalysisServicesRefreshException

Indicate that an Azure Analysis Services model refresh operation failed.

Classes

AzureAnalysisServicesRefreshStatus

Azure Analysis Services model refresh statuses.

AzureAnalysisServicesHook

Interact with the Azure Analysis Services asynchronous refresh REST API.

Module Contents

airflow.providers.microsoft.azure.hooks.analysis_services.TOKEN_SCOPE = 'https://*.asazure.windows.net/.default'[source]
airflow.providers.microsoft.azure.hooks.analysis_services.RefreshType[source]
airflow.providers.microsoft.azure.hooks.analysis_services.VALID_REFRESH_TYPES: frozenset[str][source]
class airflow.providers.microsoft.azure.hooks.analysis_services.AzureAnalysisServicesRefreshStatus[source]

Azure Analysis Services model refresh statuses.

SUCCEEDED = 'succeeded'[source]
FAILED = 'failed'[source]
CANCELLED = 'cancelled'[source]
TIMED_OUT = 'timedOut'[source]
NOT_STARTED = 'notStarted'[source]
IN_PROGRESS = 'inProgress'[source]
FAILURE_STATUSES[source]
VALID_STATUSES[source]
exception airflow.providers.microsoft.azure.hooks.analysis_services.AzureAnalysisServicesRefreshException[source]

Bases: airflow.providers.common.compat.sdk.AirflowException

Indicate that an Azure Analysis Services model refresh operation failed.

class airflow.providers.microsoft.azure.hooks.analysis_services.AzureAnalysisServicesHook(azure_analysis_services_conn_id=default_conn_name, request_timeout=60)[source]

Bases: airflow.providers.common.compat.sdk.BaseHook

Interact with the Azure Analysis Services asynchronous refresh REST API.

All request methods are asynchronous and are meant to be awaited from a trigger. Call aclose() when done so the HTTP client and the credential release their resources.

Parameters:
  • azure_analysis_services_conn_id (str) – The Azure Analysis Services connection ID.

  • request_timeout (float) – Timeout in seconds for each HTTP request.

The connection must define the region endpoint in host, the service principal client ID in login, the client secret in password, and the Microsoft Entra tenant ID in the tenantId extra field.

conn_type: str = 'azure_analysis_services'[source]
conn_name_attr: str = 'azure_analysis_services_conn_id'[source]
default_conn_name: str = 'azure_analysis_services_default'[source]
hook_name: str = 'Azure Analysis Services'[source]
azure_analysis_services_conn_id = 'azure_analysis_services_default'[source]
request_timeout = 60[source]
property connection: airflow.sdk.Connection[source]

Return the Azure Analysis Services connection.

classmethod get_connection_form_widgets()[source]

Return connection widgets to add to the connection form.

classmethod get_ui_field_behaviour()[source]

Return custom field behaviour for the connection form.

get_conn()[source]

Return and cache the HTTP client used to communicate with Analysis Services.

async aclose()[source]

Release the HTTP client and the credential.

async get_refresh_status(server_name, database, refresh_id)[source]

Return the validated status of an Azure Analysis Services model refresh.

async wait_for_refresh(server_name, database, refresh_id, poke_interval)[source]

Poll until the refresh reaches a terminal status and return it.

async trigger_refresh(server_name, database, refresh_type='full')[source]

Trigger a model refresh and return its refresh ID.

Was this entry helpful?