airflow.providers.microsoft.azure.hooks.synapse
¶
Module Contents¶
Classes¶
Azure Synapse Spark Job operation statuses. |
|
A hook to interact with Azure Synapse. |
Attributes¶
- class airflow.providers.microsoft.azure.hooks.synapse.AzureSynapseSparkBatchRunStatus[source]¶
Azure Synapse Spark Job operation statuses.
- class airflow.providers.microsoft.azure.hooks.synapse.AzureSynapseHook(azure_synapse_conn_id=default_conn_name, spark_pool='')[source]¶
Bases:
airflow.hooks.base.BaseHook
A hook to interact with Azure Synapse. :param azure_synapse_conn_id: The Azure Synapse connection id. :param spark_pool: The Apache Spark pool used to submit the job
- run_spark_job(payload)[source]¶
Run a job in an Apache Spark pool. :param payload: Livy compatible payload which represents the spark job that a user wants to submit.
- wait_for_job_run_status(job_id, expected_statuses, check_interval=60, timeout=60 * 60 * 24 * 7)[source]¶
Waits for a job run to match an expected status.
- Parameters
job_id (int | None) – The job run identifier.
expected_statuses (str | set[str]) – The desired status(es) to check against a job run’s current status.
check_interval (int) – Time in seconds to check on a job run’s status.
timeout (int) – Time in seconds to wait for a job to reach a terminal status or the expected status.