airflow.providers.microsoft.azure.operators.analysis_services

Classes

AzureAnalysisServicesRefreshOperator

Trigger an Azure Analysis Services model refresh and optionally wait for completion.

Module Contents

class airflow.providers.microsoft.azure.operators.analysis_services.AzureAnalysisServicesRefreshOperator(*, server_name, database, azure_analysis_services_conn_id=AzureAnalysisServicesHook.default_conn_name, refresh_type='full', wait_for_termination=True, check_interval=60, timeout=60 * 60 * 24 * 7, request_timeout=60, **kwargs)[source]

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

Trigger an Azure Analysis Services model refresh and optionally wait for completion.

The operator always runs deferred: both the request that starts the refresh and the status polling happen in the triggerer, so no worker slot is held while the model is refreshing. A triggerer must therefore be running in the deployment.

See also

For more information, see Start a model refresh.

Parameters:
  • server_name (str) – The Analysis Services server name.

  • database (str) – The model database name.

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

  • refresh_type (airflow.providers.microsoft.azure.hooks.analysis_services.RefreshType) – The processing type to request.

  • wait_for_termination (bool) – Wait for the refresh to reach a terminal status.

  • check_interval (float) – Time in seconds between status requests.

  • timeout (float) – Maximum time in seconds to wait for the refresh to complete. The clock starts once the refresh has been submitted.

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

template_fields: collections.abc.Sequence[str] = ('azure_analysis_services_conn_id', 'server_name', 'database', 'refresh_type')[source]
ui_color = '#0078d4'[source]
ui_fgcolor = '#ffffff'[source]
server_name[source]
database[source]
azure_analysis_services_conn_id = 'azure_analysis_services_default'[source]
refresh_type = 'full'[source]
wait_for_termination = True[source]
check_interval = 60[source]
timeout = 604800[source]
request_timeout = 60[source]
execute(context)[source]

Defer to the trigger so the refresh is submitted off the worker.

handle_refresh(context, event)[source]

Record the new refresh ID and defer again when the refresh has to be awaited.

execute_complete(context, event)[source]

Validate the terminal trigger event and return the refresh ID.

Was this entry helpful?