apache-airflow-providers-microsoft-azure 12.4.1rc1__py3-none-any.whl → 12.5.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airflow/providers/microsoft/azure/__init__.py +1 -1
- airflow/providers/microsoft/azure/fs/adls.py +5 -1
- airflow/providers/microsoft/azure/hooks/adx.py +9 -5
- airflow/providers/microsoft/azure/hooks/asb.py +7 -2
- airflow/providers/microsoft/azure/hooks/base_azure.py +6 -2
- airflow/providers/microsoft/azure/hooks/batch.py +5 -1
- airflow/providers/microsoft/azure/hooks/container_instance.py +3 -1
- airflow/providers/microsoft/azure/hooks/container_registry.py +9 -3
- airflow/providers/microsoft/azure/hooks/container_volume.py +7 -3
- airflow/providers/microsoft/azure/hooks/cosmos.py +10 -5
- airflow/providers/microsoft/azure/hooks/data_factory.py +9 -4
- airflow/providers/microsoft/azure/hooks/data_lake.py +14 -9
- airflow/providers/microsoft/azure/hooks/fileshare.py +5 -1
- airflow/providers/microsoft/azure/hooks/msgraph.py +10 -4
- airflow/providers/microsoft/azure/hooks/powerbi.py +5 -1
- airflow/providers/microsoft/azure/hooks/synapse.py +7 -3
- airflow/providers/microsoft/azure/hooks/wasb.py +39 -23
- airflow/providers/microsoft/azure/operators/adls.py +1 -1
- airflow/providers/microsoft/azure/operators/adx.py +1 -1
- airflow/providers/microsoft/azure/operators/asb.py +3 -3
- airflow/providers/microsoft/azure/operators/batch.py +1 -1
- airflow/providers/microsoft/azure/operators/container_instances.py +1 -1
- airflow/providers/microsoft/azure/operators/cosmos.py +1 -1
- airflow/providers/microsoft/azure/operators/data_factory.py +6 -2
- airflow/providers/microsoft/azure/operators/msgraph.py +3 -4
- airflow/providers/microsoft/azure/operators/powerbi.py +9 -9
- airflow/providers/microsoft/azure/operators/synapse.py +6 -2
- airflow/providers/microsoft/azure/operators/wasb_delete_blob.py +1 -1
- airflow/providers/microsoft/azure/sensors/cosmos.py +6 -1
- airflow/providers/microsoft/azure/sensors/data_factory.py +6 -1
- airflow/providers/microsoft/azure/sensors/msgraph.py +8 -3
- airflow/providers/microsoft/azure/sensors/wasb.py +6 -1
- airflow/providers/microsoft/azure/transfers/local_to_adls.py +1 -1
- airflow/providers/microsoft/azure/transfers/local_to_wasb.py +1 -1
- airflow/providers/microsoft/azure/transfers/oracle_to_azure_data_lake.py +1 -1
- airflow/providers/microsoft/azure/transfers/s3_to_wasb.py +1 -1
- airflow/providers/microsoft/azure/transfers/sftp_to_wasb.py +3 -0
- airflow/providers/microsoft/azure/triggers/powerbi.py +6 -2
- airflow/providers/microsoft/azure/version_compat.py +17 -0
- {apache_airflow_providers_microsoft_azure-12.4.1rc1.dist-info → apache_airflow_providers_microsoft_azure-12.5.0rc1.dist-info}/METADATA +18 -19
- apache_airflow_providers_microsoft_azure-12.5.0rc1.dist-info/RECORD +59 -0
- apache_airflow_providers_microsoft_azure-12.4.1rc1.dist-info/RECORD +0 -59
- {apache_airflow_providers_microsoft_azure-12.4.1rc1.dist-info → apache_airflow_providers_microsoft_azure-12.5.0rc1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_microsoft_azure-12.4.1rc1.dist-info → apache_airflow_providers_microsoft_azure-12.5.0rc1.dist-info}/entry_points.txt +0 -0
@@ -24,8 +24,8 @@ from functools import cached_property
|
|
24
24
|
from typing import TYPE_CHECKING
|
25
25
|
|
26
26
|
from airflow.configuration import conf
|
27
|
-
from airflow.models import BaseOperator
|
28
27
|
from airflow.providers.microsoft.azure.hooks.adx import AzureDataExplorerHook
|
28
|
+
from airflow.providers.microsoft.azure.version_compat import BaseOperator
|
29
29
|
|
30
30
|
if TYPE_CHECKING:
|
31
31
|
from azure.kusto.data._models import KustoResultTable
|
@@ -16,12 +16,12 @@
|
|
16
16
|
# under the License.
|
17
17
|
from __future__ import annotations
|
18
18
|
|
19
|
-
from collections.abc import Sequence
|
20
|
-
from typing import TYPE_CHECKING, Any
|
19
|
+
from collections.abc import Callable, Sequence
|
20
|
+
from typing import TYPE_CHECKING, Any
|
21
21
|
from uuid import UUID
|
22
22
|
|
23
|
-
from airflow.models import BaseOperator
|
24
23
|
from airflow.providers.microsoft.azure.hooks.asb import AdminClientHook, MessageHook
|
24
|
+
from airflow.providers.microsoft.azure.version_compat import BaseOperator
|
25
25
|
|
26
26
|
if TYPE_CHECKING:
|
27
27
|
import datetime
|
@@ -24,8 +24,8 @@ from typing import TYPE_CHECKING, Any
|
|
24
24
|
from azure.batch import models as batch_models
|
25
25
|
|
26
26
|
from airflow.exceptions import AirflowException
|
27
|
-
from airflow.models import BaseOperator
|
28
27
|
from airflow.providers.microsoft.azure.hooks.batch import AzureBatchHook
|
28
|
+
from airflow.providers.microsoft.azure.version_compat import BaseOperator
|
29
29
|
|
30
30
|
if TYPE_CHECKING:
|
31
31
|
from airflow.utils.context import Context
|
@@ -40,10 +40,10 @@ from azure.mgmt.containerinstance.models import (
|
|
40
40
|
from msrestazure.azure_exceptions import CloudError
|
41
41
|
|
42
42
|
from airflow.exceptions import AirflowException, AirflowTaskTimeout
|
43
|
-
from airflow.models import BaseOperator
|
44
43
|
from airflow.providers.microsoft.azure.hooks.container_instance import AzureContainerInstanceHook
|
45
44
|
from airflow.providers.microsoft.azure.hooks.container_registry import AzureContainerRegistryHook
|
46
45
|
from airflow.providers.microsoft.azure.hooks.container_volume import AzureContainerVolumeHook
|
46
|
+
from airflow.providers.microsoft.azure.version_compat import BaseOperator
|
47
47
|
|
48
48
|
if TYPE_CHECKING:
|
49
49
|
from airflow.utils.context import Context
|
@@ -20,8 +20,8 @@ from __future__ import annotations
|
|
20
20
|
from collections.abc import Sequence
|
21
21
|
from typing import TYPE_CHECKING
|
22
22
|
|
23
|
-
from airflow.models import BaseOperator
|
24
23
|
from airflow.providers.microsoft.azure.hooks.cosmos import AzureCosmosDBHook
|
24
|
+
from airflow.providers.microsoft.azure.version_compat import BaseOperator
|
25
25
|
|
26
26
|
if TYPE_CHECKING:
|
27
27
|
from airflow.utils.context import Context
|
@@ -24,8 +24,6 @@ from typing import TYPE_CHECKING, Any
|
|
24
24
|
|
25
25
|
from airflow.configuration import conf
|
26
26
|
from airflow.exceptions import AirflowException
|
27
|
-
from airflow.hooks.base import BaseHook
|
28
|
-
from airflow.models import BaseOperator
|
29
27
|
from airflow.providers.microsoft.azure.hooks.data_factory import (
|
30
28
|
AzureDataFactoryHook,
|
31
29
|
AzureDataFactoryPipelineRunException,
|
@@ -33,6 +31,12 @@ from airflow.providers.microsoft.azure.hooks.data_factory import (
|
|
33
31
|
get_field,
|
34
32
|
)
|
35
33
|
from airflow.providers.microsoft.azure.triggers.data_factory import AzureDataFactoryTrigger
|
34
|
+
|
35
|
+
try:
|
36
|
+
from airflow.sdk import BaseHook
|
37
|
+
except ImportError:
|
38
|
+
from airflow.hooks.base import BaseHook # type: ignore[attr-defined,no-redef]
|
39
|
+
from airflow.providers.microsoft.azure.version_compat import BaseOperator
|
36
40
|
from airflow.utils.log.logging_mixin import LoggingMixin
|
37
41
|
|
38
42
|
if TYPE_CHECKING:
|
@@ -18,22 +18,21 @@
|
|
18
18
|
from __future__ import annotations
|
19
19
|
|
20
20
|
import warnings
|
21
|
-
from collections.abc import Sequence
|
21
|
+
from collections.abc import Callable, Sequence
|
22
22
|
from contextlib import suppress
|
23
23
|
from copy import deepcopy
|
24
24
|
from typing import (
|
25
25
|
TYPE_CHECKING,
|
26
26
|
Any,
|
27
|
-
Callable,
|
28
27
|
)
|
29
28
|
|
30
29
|
from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning, TaskDeferred
|
31
|
-
from airflow.models import BaseOperator
|
32
30
|
from airflow.providers.microsoft.azure.hooks.msgraph import KiotaRequestAdapterHook
|
33
31
|
from airflow.providers.microsoft.azure.triggers.msgraph import (
|
34
32
|
MSGraphTrigger,
|
35
33
|
ResponseSerializer,
|
36
34
|
)
|
35
|
+
from airflow.providers.microsoft.azure.version_compat import BaseOperator
|
37
36
|
from airflow.utils.xcom import XCOM_RETURN_KEY
|
38
37
|
|
39
38
|
if TYPE_CHECKING:
|
@@ -308,7 +307,7 @@ class MSGraphAsyncOperator(BaseOperator):
|
|
308
307
|
self.key,
|
309
308
|
value,
|
310
309
|
)
|
311
|
-
|
310
|
+
context["ti"].xcom_push(key=self.key, value=value)
|
312
311
|
|
313
312
|
@staticmethod
|
314
313
|
def paginate(
|
@@ -21,13 +21,13 @@ from collections.abc import Sequence
|
|
21
21
|
from typing import TYPE_CHECKING, Any
|
22
22
|
|
23
23
|
from airflow.exceptions import AirflowException
|
24
|
-
from airflow.models import BaseOperator
|
25
24
|
from airflow.providers.microsoft.azure.hooks.powerbi import PowerBIHook
|
26
25
|
from airflow.providers.microsoft.azure.triggers.powerbi import (
|
27
26
|
PowerBIDatasetListTrigger,
|
28
27
|
PowerBITrigger,
|
29
28
|
PowerBIWorkspaceListTrigger,
|
30
29
|
)
|
30
|
+
from airflow.providers.microsoft.azure.version_compat import BaseOperator
|
31
31
|
|
32
32
|
if TYPE_CHECKING:
|
33
33
|
from msgraph_core import APIVersion
|
@@ -72,6 +72,7 @@ class PowerBIDatasetRefreshOperator(BaseOperator):
|
|
72
72
|
:param timeout: Time in seconds to wait for a dataset to reach a terminal status for asynchronous waits. Used only if ``wait_for_termination`` is True.
|
73
73
|
:param check_interval: Number of seconds to wait before rechecking the
|
74
74
|
refresh status.
|
75
|
+
:param request_body: Additional arguments to pass to the request body, as described in https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/refresh-dataset-in-group#request-body.
|
75
76
|
"""
|
76
77
|
|
77
78
|
template_fields: Sequence[str] = (
|
@@ -92,6 +93,7 @@ class PowerBIDatasetRefreshOperator(BaseOperator):
|
|
92
93
|
proxies: dict | None = None,
|
93
94
|
api_version: APIVersion | str | None = None,
|
94
95
|
check_interval: int = 60,
|
96
|
+
request_body: dict[str, Any] | None = None,
|
95
97
|
**kwargs,
|
96
98
|
) -> None:
|
97
99
|
super().__init__(**kwargs)
|
@@ -102,6 +104,7 @@ class PowerBIDatasetRefreshOperator(BaseOperator):
|
|
102
104
|
self.conn_id = conn_id
|
103
105
|
self.timeout = timeout
|
104
106
|
self.check_interval = check_interval
|
107
|
+
self.request_body = request_body
|
105
108
|
|
106
109
|
@property
|
107
110
|
def proxies(self) -> dict | None:
|
@@ -124,6 +127,7 @@ class PowerBIDatasetRefreshOperator(BaseOperator):
|
|
124
127
|
api_version=self.api_version,
|
125
128
|
check_interval=self.check_interval,
|
126
129
|
wait_for_termination=self.wait_for_termination,
|
130
|
+
request_body=self.request_body,
|
127
131
|
),
|
128
132
|
method_name=self.get_refresh_status.__name__,
|
129
133
|
)
|
@@ -137,8 +141,7 @@ class PowerBIDatasetRefreshOperator(BaseOperator):
|
|
137
141
|
dataset_refresh_id = event["dataset_refresh_id"]
|
138
142
|
|
139
143
|
if dataset_refresh_id:
|
140
|
-
|
141
|
-
context=context,
|
144
|
+
context["ti"].xcom_push(
|
142
145
|
key=f"{self.task_id}.powerbi_dataset_refresh_Id",
|
143
146
|
value=dataset_refresh_id,
|
144
147
|
)
|
@@ -164,8 +167,7 @@ class PowerBIDatasetRefreshOperator(BaseOperator):
|
|
164
167
|
Relies on trigger to throw an exception, otherwise it assumes execution was successful.
|
165
168
|
"""
|
166
169
|
if event:
|
167
|
-
|
168
|
-
context=context,
|
170
|
+
context["ti"].xcom_push(
|
169
171
|
key=f"{self.task_id}.powerbi_dataset_refresh_status",
|
170
172
|
value=event["dataset_refresh_status"],
|
171
173
|
)
|
@@ -231,8 +233,7 @@ class PowerBIWorkspaceListOperator(BaseOperator):
|
|
231
233
|
Relies on trigger to throw an exception, otherwise it assumes execution was successful.
|
232
234
|
"""
|
233
235
|
if event:
|
234
|
-
|
235
|
-
context=context,
|
236
|
+
context["ti"].xcom_push(
|
236
237
|
key=f"{self.task_id}.powerbi_workspace_ids",
|
237
238
|
value=event["workspace_ids"],
|
238
239
|
)
|
@@ -302,8 +303,7 @@ class PowerBIDatasetListOperator(BaseOperator):
|
|
302
303
|
Relies on trigger to throw an exception, otherwise it assumes execution was successful.
|
303
304
|
"""
|
304
305
|
if event:
|
305
|
-
|
306
|
-
context=context,
|
306
|
+
context["ti"].xcom_push(
|
307
307
|
key=f"{self.task_id}.powerbi_dataset_ids",
|
308
308
|
value=event["dataset_ids"],
|
309
309
|
)
|
@@ -22,8 +22,6 @@ from typing import TYPE_CHECKING, Any
|
|
22
22
|
from urllib.parse import urlencode
|
23
23
|
|
24
24
|
from airflow.exceptions import AirflowException
|
25
|
-
from airflow.hooks.base import BaseHook
|
26
|
-
from airflow.models import BaseOperator
|
27
25
|
from airflow.providers.microsoft.azure.hooks.synapse import (
|
28
26
|
AzureSynapseHook,
|
29
27
|
AzureSynapsePipelineHook,
|
@@ -31,6 +29,12 @@ from airflow.providers.microsoft.azure.hooks.synapse import (
|
|
31
29
|
AzureSynapsePipelineRunStatus,
|
32
30
|
AzureSynapseSparkBatchRunStatus,
|
33
31
|
)
|
32
|
+
from airflow.providers.microsoft.azure.version_compat import BaseOperator
|
33
|
+
|
34
|
+
try:
|
35
|
+
from airflow.sdk import BaseHook
|
36
|
+
except ImportError:
|
37
|
+
from airflow.hooks.base import BaseHook # type: ignore[attr-defined,no-redef]
|
34
38
|
|
35
39
|
if TYPE_CHECKING:
|
36
40
|
from azure.synapse.spark.models import SparkBatchJobOptions
|
@@ -20,8 +20,8 @@ from __future__ import annotations
|
|
20
20
|
from collections.abc import Sequence
|
21
21
|
from typing import TYPE_CHECKING, Any
|
22
22
|
|
23
|
-
from airflow.models import BaseOperator
|
24
23
|
from airflow.providers.microsoft.azure.hooks.wasb import WasbHook
|
24
|
+
from airflow.providers.microsoft.azure.version_compat import BaseOperator
|
25
25
|
|
26
26
|
if TYPE_CHECKING:
|
27
27
|
from airflow.utils.context import Context
|
@@ -21,7 +21,12 @@ from collections.abc import Sequence
|
|
21
21
|
from typing import TYPE_CHECKING
|
22
22
|
|
23
23
|
from airflow.providers.microsoft.azure.hooks.cosmos import AzureCosmosDBHook
|
24
|
-
from airflow.
|
24
|
+
from airflow.providers.microsoft.azure.version_compat import AIRFLOW_V_3_0_PLUS
|
25
|
+
|
26
|
+
if AIRFLOW_V_3_0_PLUS:
|
27
|
+
from airflow.sdk import BaseSensorOperator
|
28
|
+
else:
|
29
|
+
from airflow.sensors.base import BaseSensorOperator # type: ignore[no-redef]
|
25
30
|
|
26
31
|
if TYPE_CHECKING:
|
27
32
|
from airflow.utils.context import Context
|
@@ -29,7 +29,12 @@ from airflow.providers.microsoft.azure.hooks.data_factory import (
|
|
29
29
|
AzureDataFactoryPipelineRunStatus,
|
30
30
|
)
|
31
31
|
from airflow.providers.microsoft.azure.triggers.data_factory import ADFPipelineRunStatusSensorTrigger
|
32
|
-
from airflow.
|
32
|
+
from airflow.providers.microsoft.azure.version_compat import AIRFLOW_V_3_0_PLUS
|
33
|
+
|
34
|
+
if AIRFLOW_V_3_0_PLUS:
|
35
|
+
from airflow.sdk.bases.sensor import BaseSensorOperator
|
36
|
+
else:
|
37
|
+
from airflow.sensors.base import BaseSensorOperator # type: ignore[no-redef]
|
33
38
|
|
34
39
|
if TYPE_CHECKING:
|
35
40
|
from airflow.utils.context import Context
|
@@ -17,15 +17,20 @@
|
|
17
17
|
# under the License.
|
18
18
|
from __future__ import annotations
|
19
19
|
|
20
|
-
from collections.abc import Sequence
|
21
|
-
from typing import TYPE_CHECKING, Any
|
20
|
+
from collections.abc import Callable, Sequence
|
21
|
+
from typing import TYPE_CHECKING, Any
|
22
22
|
|
23
23
|
from airflow.exceptions import AirflowException
|
24
24
|
from airflow.providers.common.compat.standard.triggers import TimeDeltaTrigger
|
25
25
|
from airflow.providers.microsoft.azure.hooks.msgraph import KiotaRequestAdapterHook
|
26
26
|
from airflow.providers.microsoft.azure.operators.msgraph import execute_callable
|
27
27
|
from airflow.providers.microsoft.azure.triggers.msgraph import MSGraphTrigger, ResponseSerializer
|
28
|
-
from airflow.
|
28
|
+
from airflow.providers.microsoft.azure.version_compat import AIRFLOW_V_3_0_PLUS
|
29
|
+
|
30
|
+
if AIRFLOW_V_3_0_PLUS:
|
31
|
+
from airflow.sdk import BaseSensorOperator
|
32
|
+
else:
|
33
|
+
from airflow.sensors.base import BaseSensorOperator # type: ignore[no-redef]
|
29
34
|
|
30
35
|
if TYPE_CHECKING:
|
31
36
|
from datetime import timedelta
|
@@ -25,7 +25,12 @@ from airflow.configuration import conf
|
|
25
25
|
from airflow.exceptions import AirflowException
|
26
26
|
from airflow.providers.microsoft.azure.hooks.wasb import WasbHook
|
27
27
|
from airflow.providers.microsoft.azure.triggers.wasb import WasbBlobSensorTrigger, WasbPrefixSensorTrigger
|
28
|
-
from airflow.
|
28
|
+
from airflow.providers.microsoft.azure.version_compat import AIRFLOW_V_3_0_PLUS
|
29
|
+
|
30
|
+
if AIRFLOW_V_3_0_PLUS:
|
31
|
+
from airflow.sdk import BaseSensorOperator
|
32
|
+
else:
|
33
|
+
from airflow.sensors.base import BaseSensorOperator # type: ignore[no-redef]
|
29
34
|
|
30
35
|
if TYPE_CHECKING:
|
31
36
|
from airflow.utils.context import Context
|
@@ -20,8 +20,8 @@ from collections.abc import Sequence
|
|
20
20
|
from typing import TYPE_CHECKING, Any
|
21
21
|
|
22
22
|
from airflow.exceptions import AirflowException
|
23
|
-
from airflow.models import BaseOperator
|
24
23
|
from airflow.providers.microsoft.azure.hooks.data_lake import AzureDataLakeHook
|
24
|
+
from airflow.providers.microsoft.azure.version_compat import BaseOperator
|
25
25
|
|
26
26
|
if TYPE_CHECKING:
|
27
27
|
from airflow.utils.context import Context
|
@@ -20,8 +20,8 @@ from __future__ import annotations
|
|
20
20
|
from collections.abc import Sequence
|
21
21
|
from typing import TYPE_CHECKING
|
22
22
|
|
23
|
-
from airflow.models import BaseOperator
|
24
23
|
from airflow.providers.microsoft.azure.hooks.wasb import WasbHook
|
24
|
+
from airflow.providers.microsoft.azure.version_compat import BaseOperator
|
25
25
|
|
26
26
|
if TYPE_CHECKING:
|
27
27
|
from airflow.utils.context import Context
|
@@ -23,8 +23,8 @@ from collections.abc import Sequence
|
|
23
23
|
from tempfile import TemporaryDirectory
|
24
24
|
from typing import TYPE_CHECKING, Any
|
25
25
|
|
26
|
-
from airflow.models import BaseOperator
|
27
26
|
from airflow.providers.microsoft.azure.hooks.data_lake import AzureDataLakeHook
|
27
|
+
from airflow.providers.microsoft.azure.version_compat import BaseOperator
|
28
28
|
from airflow.providers.oracle.hooks.oracle import OracleHook
|
29
29
|
|
30
30
|
if TYPE_CHECKING:
|
@@ -22,9 +22,9 @@ from collections.abc import Sequence
|
|
22
22
|
from functools import cached_property
|
23
23
|
from typing import TYPE_CHECKING
|
24
24
|
|
25
|
-
from airflow.models import BaseOperator
|
26
25
|
from airflow.providers.amazon.aws.hooks.s3 import S3Hook
|
27
26
|
from airflow.providers.microsoft.azure.hooks.wasb import WasbHook
|
27
|
+
from airflow.providers.microsoft.azure.version_compat import BaseOperator
|
28
28
|
|
29
29
|
if TYPE_CHECKING:
|
30
30
|
from airflow.utils.context import Context
|
@@ -32,6 +32,7 @@ if TYPE_CHECKING:
|
|
32
32
|
from airflow.exceptions import AirflowException
|
33
33
|
from airflow.models import BaseOperator
|
34
34
|
from airflow.providers.microsoft.azure.hooks.wasb import WasbHook
|
35
|
+
from airflow.providers.microsoft.azure.version_compat import AIRFLOW_V_3_0_PLUS
|
35
36
|
from airflow.providers.sftp.hooks.sftp import SFTPHook
|
36
37
|
|
37
38
|
WILDCARD = "*"
|
@@ -98,6 +99,8 @@ class SFTPToWasbOperator(BaseOperator):
|
|
98
99
|
self.create_container = create_container
|
99
100
|
|
100
101
|
def dry_run(self) -> None:
|
102
|
+
if not AIRFLOW_V_3_0_PLUS:
|
103
|
+
raise NotImplementedError("Not implemented for Airflow 3.")
|
101
104
|
super().dry_run()
|
102
105
|
sftp_files: list[SftpFile] = self.get_sftp_files_map()
|
103
106
|
for file in sftp_files:
|
@@ -20,7 +20,7 @@ from __future__ import annotations
|
|
20
20
|
import asyncio
|
21
21
|
import time
|
22
22
|
from collections.abc import AsyncIterator
|
23
|
-
from typing import TYPE_CHECKING
|
23
|
+
from typing import TYPE_CHECKING, Any
|
24
24
|
|
25
25
|
import tenacity
|
26
26
|
|
@@ -51,9 +51,9 @@ class PowerBITrigger(BaseTrigger):
|
|
51
51
|
:param dataset_id: The dataset Id to refresh.
|
52
52
|
:param dataset_refresh_id: The dataset refresh Id to poll for the status, if not provided a new refresh will be triggered.
|
53
53
|
:param group_id: The workspace Id where dataset is located.
|
54
|
-
:param end_time: Time in seconds when trigger should stop polling.
|
55
54
|
:param check_interval: Time in seconds to wait between each poll.
|
56
55
|
:param wait_for_termination: Wait for the dataset refresh to complete or fail.
|
56
|
+
:param request_body: Additional arguments to pass to the request body, as described in https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/refresh-dataset-in-group#request-body.
|
57
57
|
"""
|
58
58
|
|
59
59
|
def __init__(
|
@@ -67,6 +67,7 @@ class PowerBITrigger(BaseTrigger):
|
|
67
67
|
api_version: APIVersion | str | None = None,
|
68
68
|
check_interval: int = 60,
|
69
69
|
wait_for_termination: bool = True,
|
70
|
+
request_body: dict[str, Any] | None = None,
|
70
71
|
):
|
71
72
|
super().__init__()
|
72
73
|
self.hook = PowerBIHook(conn_id=conn_id, proxies=proxies, api_version=api_version, timeout=timeout)
|
@@ -76,6 +77,7 @@ class PowerBITrigger(BaseTrigger):
|
|
76
77
|
self.group_id = group_id
|
77
78
|
self.check_interval = check_interval
|
78
79
|
self.wait_for_termination = wait_for_termination
|
80
|
+
self.request_body = request_body
|
79
81
|
|
80
82
|
def serialize(self):
|
81
83
|
"""Serialize the trigger instance."""
|
@@ -91,6 +93,7 @@ class PowerBITrigger(BaseTrigger):
|
|
91
93
|
"timeout": self.timeout,
|
92
94
|
"check_interval": self.check_interval,
|
93
95
|
"wait_for_termination": self.wait_for_termination,
|
96
|
+
"request_body": self.request_body,
|
94
97
|
},
|
95
98
|
)
|
96
99
|
|
@@ -113,6 +116,7 @@ class PowerBITrigger(BaseTrigger):
|
|
113
116
|
dataset_refresh_id = await self.hook.trigger_dataset_refresh(
|
114
117
|
dataset_id=self.dataset_id,
|
115
118
|
group_id=self.group_id,
|
119
|
+
request_body=self.request_body,
|
116
120
|
)
|
117
121
|
|
118
122
|
if dataset_refresh_id:
|
@@ -33,3 +33,20 @@ def get_base_airflow_version_tuple() -> tuple[int, int, int]:
|
|
33
33
|
|
34
34
|
|
35
35
|
AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)
|
36
|
+
|
37
|
+
if AIRFLOW_V_3_0_PLUS:
|
38
|
+
from airflow.sdk import (
|
39
|
+
BaseOperator,
|
40
|
+
BaseOperatorLink,
|
41
|
+
BaseSensorOperator,
|
42
|
+
)
|
43
|
+
else:
|
44
|
+
from airflow.models import BaseOperator, BaseOperatorLink # type: ignore[no-redef]
|
45
|
+
from airflow.sensors.base import BaseSensorOperator # type: ignore[no-redef]
|
46
|
+
|
47
|
+
__all__ = [
|
48
|
+
"AIRFLOW_V_3_0_PLUS",
|
49
|
+
"BaseOperator",
|
50
|
+
"BaseOperatorLink",
|
51
|
+
"BaseSensorOperator",
|
52
|
+
]
|
@@ -1,11 +1,11 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: apache-airflow-providers-microsoft-azure
|
3
|
-
Version: 12.
|
3
|
+
Version: 12.5.0rc1
|
4
4
|
Summary: Provider package apache-airflow-providers-microsoft-azure for Apache Airflow
|
5
5
|
Keywords: airflow-provider,microsoft.azure,airflow,integration
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
7
7
|
Maintainer-email: Apache Software Foundation <dev@airflow.apache.org>
|
8
|
-
Requires-Python: ~=3.
|
8
|
+
Requires-Python: ~=3.10
|
9
9
|
Description-Content-Type: text/x-rst
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
11
11
|
Classifier: Environment :: Console
|
@@ -15,7 +15,6 @@ Classifier: Intended Audience :: System Administrators
|
|
15
15
|
Classifier: Framework :: Apache Airflow
|
16
16
|
Classifier: Framework :: Apache Airflow :: Provider
|
17
17
|
Classifier: License :: OSI Approved :: Apache Software License
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
19
18
|
Classifier: Programming Language :: Python :: 3.10
|
20
19
|
Classifier: Programming Language :: Python :: 3.11
|
21
20
|
Classifier: Programming Language :: Python :: 3.12
|
@@ -44,11 +43,11 @@ Requires-Dist: azure-mgmt-containerregistry>=8.0.0
|
|
44
43
|
Requires-Dist: azure-mgmt-containerinstance>=10.1.0
|
45
44
|
Requires-Dist: flask-appbuilder>=4.0.0
|
46
45
|
Requires-Dist: msgraph-core>=1.3.3
|
47
|
-
Requires-Dist: microsoft-kiota-http>=1.9.
|
48
|
-
Requires-Dist: microsoft-kiota-serialization-json>=1.9.
|
49
|
-
Requires-Dist: microsoft-kiota-serialization-text>=1.9.
|
50
|
-
Requires-Dist: microsoft-kiota-abstractions>=1.9.
|
51
|
-
Requires-Dist: microsoft-kiota-authentication-azure>=1.9.
|
46
|
+
Requires-Dist: microsoft-kiota-http>=1.9.4,<2.0.0
|
47
|
+
Requires-Dist: microsoft-kiota-serialization-json>=1.9.4
|
48
|
+
Requires-Dist: microsoft-kiota-serialization-text>=1.9.4
|
49
|
+
Requires-Dist: microsoft-kiota-abstractions>=1.9.4,<2.0.0
|
50
|
+
Requires-Dist: microsoft-kiota-authentication-azure>=1.9.4,<2.0.0
|
52
51
|
Requires-Dist: msal-extensions>=1.1.0
|
53
52
|
Requires-Dist: portalocker>=2.8.1
|
54
53
|
Requires-Dist: apache-airflow-providers-amazon ; extra == "amazon"
|
@@ -56,8 +55,8 @@ Requires-Dist: apache-airflow-providers-common-compat ; extra == "common-compat"
|
|
56
55
|
Requires-Dist: apache-airflow-providers-oracle ; extra == "oracle"
|
57
56
|
Requires-Dist: apache-airflow-providers-sftp ; extra == "sftp"
|
58
57
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
59
|
-
Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-microsoft-azure/12.
|
60
|
-
Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-microsoft-azure/12.
|
58
|
+
Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-microsoft-azure/12.5.0/changelog.html
|
59
|
+
Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-microsoft-azure/12.5.0
|
61
60
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
62
61
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
63
62
|
Project-URL: Source Code, https://github.com/apache/airflow
|
@@ -92,7 +91,7 @@ Provides-Extra: sftp
|
|
92
91
|
|
93
92
|
Package ``apache-airflow-providers-microsoft-azure``
|
94
93
|
|
95
|
-
Release: ``12.
|
94
|
+
Release: ``12.5.0``
|
96
95
|
|
97
96
|
|
98
97
|
`Microsoft Azure <https://azure.microsoft.com/>`__
|
@@ -105,7 +104,7 @@ This is a provider package for ``microsoft.azure`` provider. All classes for thi
|
|
105
104
|
are in ``airflow.providers.microsoft.azure`` python package.
|
106
105
|
|
107
106
|
You can find package information and changelog for the provider
|
108
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure/12.
|
107
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure/12.5.0/>`_.
|
109
108
|
|
110
109
|
Installation
|
111
110
|
------------
|
@@ -114,7 +113,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
|
|
114
113
|
for the minimum Airflow version supported) via
|
115
114
|
``pip install apache-airflow-providers-microsoft-azure``
|
116
115
|
|
117
|
-
The package supports the following python versions: 3.
|
116
|
+
The package supports the following python versions: 3.10,3.11,3.12
|
118
117
|
|
119
118
|
Requirements
|
120
119
|
------------
|
@@ -146,11 +145,11 @@ PIP package Version required
|
|
146
145
|
``azure-mgmt-containerinstance`` ``>=10.1.0``
|
147
146
|
``flask-appbuilder`` ``>=4.0.0``
|
148
147
|
``msgraph-core`` ``>=1.3.3``
|
149
|
-
``microsoft-kiota-http`` ``>=1.9.
|
150
|
-
``microsoft-kiota-serialization-json`` ``>=1.9.
|
151
|
-
``microsoft-kiota-serialization-text`` ``>=1.9.
|
152
|
-
``microsoft-kiota-abstractions`` ``>=1.9.
|
153
|
-
``microsoft-kiota-authentication-azure`` ``>=1.9.
|
148
|
+
``microsoft-kiota-http`` ``>=1.9.4,<2.0.0``
|
149
|
+
``microsoft-kiota-serialization-json`` ``>=1.9.4``
|
150
|
+
``microsoft-kiota-serialization-text`` ``>=1.9.4``
|
151
|
+
``microsoft-kiota-abstractions`` ``>=1.9.4,<2.0.0``
|
152
|
+
``microsoft-kiota-authentication-azure`` ``>=1.9.4,<2.0.0``
|
154
153
|
``msal-extensions`` ``>=1.1.0``
|
155
154
|
``portalocker`` ``>=2.8.1``
|
156
155
|
======================================== ===================
|
@@ -178,5 +177,5 @@ Dependent package
|
|
178
177
|
================================================================================================================== =================
|
179
178
|
|
180
179
|
The changelog for the provider package can be found in the
|
181
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure/12.
|
180
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure/12.5.0/changelog.html>`_.
|
182
181
|
|
@@ -0,0 +1,59 @@
|
|
1
|
+
airflow/providers/microsoft/azure/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
|
2
|
+
airflow/providers/microsoft/azure/__init__.py,sha256=PtlPRXB-MkStXtoAfrr0Pg3uWVGBlah-235qeDz6Tfg,1505
|
3
|
+
airflow/providers/microsoft/azure/get_provider_info.py,sha256=AeIwe8L-5p1z7IVF9Yc_mmQyAe149r6YVCyRpjfc3u0,18946
|
4
|
+
airflow/providers/microsoft/azure/utils.py,sha256=0iDdxz-TujH181MoI2gRf6ppOVQfj_fKGzrHAcnx7uU,8415
|
5
|
+
airflow/providers/microsoft/azure/version_compat.py,sha256=K8FMTtIkYUvO9DoDLSw6_5t3KxB5qy3WD8eTEB5L0hE,1959
|
6
|
+
airflow/providers/microsoft/azure/fs/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
7
|
+
airflow/providers/microsoft/azure/fs/adls.py,sha256=DDfaWiJPwXyz301Fky-Rqf6GfGt_zj3GXQIvdZjY2Lo,3785
|
8
|
+
airflow/providers/microsoft/azure/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
9
|
+
airflow/providers/microsoft/azure/hooks/adx.py,sha256=Gnisga6k9x6p6nBacoktGbx_Oeq8gQq1WRJmaQD3OkE,9753
|
10
|
+
airflow/providers/microsoft/azure/hooks/asb.py,sha256=O0jqrVrM0O8Z2unsXHmZwd6Hc1u0eJgyK3sDmmngPDU,30835
|
11
|
+
airflow/providers/microsoft/azure/hooks/base_azure.py,sha256=POqjsJD4yyzFxXsSy5I-pImamnxuxtdjZ5L9ENBT4FM,5489
|
12
|
+
airflow/providers/microsoft/azure/hooks/batch.py,sha256=r3YeSpSVJlaUbahQQ_qFvhTIss5Aeef4ORVaukAncoY,16154
|
13
|
+
airflow/providers/microsoft/azure/hooks/container_instance.py,sha256=0MrPLk06mg3Jm18VlteCAse_agK8ysK9dUDjbdRL66Q,7201
|
14
|
+
airflow/providers/microsoft/azure/hooks/container_registry.py,sha256=hzgjUSSNKp9PGY-VGhEnwQI8mqiDNvLa8lB9o4BriT8,5015
|
15
|
+
airflow/providers/microsoft/azure/hooks/container_volume.py,sha256=RPRxp1XxASU-g_QiH10uKkaI3XTzubkZu7GY-hYD_1Q,5883
|
16
|
+
airflow/providers/microsoft/azure/hooks/cosmos.py,sha256=xskA1CIwOjZk3rPefSZVZZMu4fEfZWvFHwhF7Uq3ueM,17683
|
17
|
+
airflow/providers/microsoft/azure/hooks/data_factory.py,sha256=VllLo3O84MLdG_fc_oWpZcmGX4skvwvnXCtsFAEyCLo,45104
|
18
|
+
airflow/providers/microsoft/azure/hooks/data_lake.py,sha256=t9LpVJ4uVF_Sb_-lTuEO9dsTAbGpvuITLhD1dMvqhwA,23990
|
19
|
+
airflow/providers/microsoft/azure/hooks/fileshare.py,sha256=7vfZzX0Ln2bdjiNBbDwOa4jIhXpMvQ1Qzoxwd976hK0,10866
|
20
|
+
airflow/providers/microsoft/azure/hooks/msgraph.py,sha256=CKO0qoU3l57gbXVoxuzQGHlsqrVmKPp-i4NLUx1qkHw,21315
|
21
|
+
airflow/providers/microsoft/azure/hooks/powerbi.py,sha256=_Z-PWDcZxwSmyP9uXBEEYNRrSIlGPFVUtDrtVk3KKxE,9778
|
22
|
+
airflow/providers/microsoft/azure/hooks/synapse.py,sha256=95sd08YzcCTwxqxBeVp8BPTrfeDq_xJSQLSMXRKbFJs,16153
|
23
|
+
airflow/providers/microsoft/azure/hooks/wasb.py,sha256=A4QEh-qC9T6eqs0exFg5QpGGz67yJQ5395FfZ-NO0nc,31652
|
24
|
+
airflow/providers/microsoft/azure/log/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
25
|
+
airflow/providers/microsoft/azure/log/wasb_task_handler.py,sha256=s0BCDf7fritIvuwznFJTUEE03GqfecKy-stf1niWr3o,9926
|
26
|
+
airflow/providers/microsoft/azure/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
27
|
+
airflow/providers/microsoft/azure/operators/adls.py,sha256=mtyCEhnva1I98nLLM6CdwbUXnBJfb045z5n5zANnTIs,5850
|
28
|
+
airflow/providers/microsoft/azure/operators/adx.py,sha256=yp7nsc0QWGxodhpwg_uQiT2XI3qNAICRjsgkcfbWmEI,3189
|
29
|
+
airflow/providers/microsoft/azure/operators/asb.py,sha256=RzipreLn5DOA8oaE_-ifx43ELAN6CX-ti2m5RSYT6rU,30511
|
30
|
+
airflow/providers/microsoft/azure/operators/batch.py,sha256=NYjaxYcFwficmJb7l3Vjdm2JeW9MFxQ3I0trIIwSb1E,16304
|
31
|
+
airflow/providers/microsoft/azure/operators/container_instances.py,sha256=8ti1L50pQQcRVL_7noKo6IXoobi8hO0-A4SlgcbIhX0,18672
|
32
|
+
airflow/providers/microsoft/azure/operators/cosmos.py,sha256=t7XWU4L5W7tr33J6lC3_mIrFANW_JE1QOYpSFydkBxs,2848
|
33
|
+
airflow/providers/microsoft/azure/operators/data_factory.py,sha256=mwHcuWObAQmtFG3pjVW3l7w_xuQddz_arQHXPdrHOq4,12946
|
34
|
+
airflow/providers/microsoft/azure/operators/msgraph.py,sha256=obqWPwN0DA6HLemLWSolrEhATGwa0zHAO3l83VxoxvU,14209
|
35
|
+
airflow/providers/microsoft/azure/operators/powerbi.py,sha256=d0GhzWxpBAM_Yq5mNDtdVpsi5kt6yQfDDJme21hCG-U,11893
|
36
|
+
airflow/providers/microsoft/azure/operators/synapse.py,sha256=8IO-uQLNztVfuevkXuRYhFAXUqnW9QnE66MK_XGliZc,12891
|
37
|
+
airflow/providers/microsoft/azure/operators/wasb_delete_blob.py,sha256=Rigi5xFXkHFNcX4-VnA4fFxJlKHlevdsCExX6VJWCts,2748
|
38
|
+
airflow/providers/microsoft/azure/secrets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
39
|
+
airflow/providers/microsoft/azure/secrets/key_vault.py,sha256=EmtGfyBtfefGu1ZTtZ5WswIleOx-nx8wst7xfcua2rI,8962
|
40
|
+
airflow/providers/microsoft/azure/sensors/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
41
|
+
airflow/providers/microsoft/azure/sensors/cosmos.py,sha256=Py3n-LOqaH2XuTxQVDZQv4d4RMREqBrmhWZ4NIbLr9Y,2851
|
42
|
+
airflow/providers/microsoft/azure/sensors/data_factory.py,sha256=u_8vcnVmjzuCrOJbTeexxytfpXlkz0bSMkuWYmyZktI,5214
|
43
|
+
airflow/providers/microsoft/azure/sensors/msgraph.py,sha256=-dWLQpLdiZlAKF9AQcHsYwRslaOdypxwss5_OSJrtg8,7918
|
44
|
+
airflow/providers/microsoft/azure/sensors/wasb.py,sha256=SXhgU2L1iTULybQzIw0059BkL6LyVRCXr6kOayCgX20,7569
|
45
|
+
airflow/providers/microsoft/azure/transfers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
46
|
+
airflow/providers/microsoft/azure/transfers/local_to_adls.py,sha256=GZl16M2V9xIDYmUyERq6-RxvbP_0VVcMmeG9Z2jLzkU,4237
|
47
|
+
airflow/providers/microsoft/azure/transfers/local_to_wasb.py,sha256=IqV18vzBwVbivfgOtsqR7q1pOs3uZBNDgoF_wrK1yAE,2997
|
48
|
+
airflow/providers/microsoft/azure/transfers/oracle_to_azure_data_lake.py,sha256=oS2WOKdiCVA-qz4PKTq-r2AoewZ4yaw2fEJ-QpmcFdg,4529
|
49
|
+
airflow/providers/microsoft/azure/transfers/s3_to_wasb.py,sha256=jQgicPw4uGyRSss9PA05TKqHdch2CNO8bMdNVEvVir0,12523
|
50
|
+
airflow/providers/microsoft/azure/transfers/sftp_to_wasb.py,sha256=l6kdtxq3SvCUo_Hx60t1YiX4bP8lF3WmbglICHk24vo,8409
|
51
|
+
airflow/providers/microsoft/azure/triggers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
52
|
+
airflow/providers/microsoft/azure/triggers/data_factory.py,sha256=U3vY_pj4yORxE7X6YR7CP3Jl73K9euCdUczy3dLmikU,11165
|
53
|
+
airflow/providers/microsoft/azure/triggers/msgraph.py,sha256=l7A50JoBebiKhhsxILtLvuoulyIn59BVdjTvdAezdpk,8704
|
54
|
+
airflow/providers/microsoft/azure/triggers/powerbi.py,sha256=TD2VYR3yj8JwRMR6QpqWM_KuBsS9qbghqV_2aBKjCus,15798
|
55
|
+
airflow/providers/microsoft/azure/triggers/wasb.py,sha256=RF-C6iqDEs6_pWireCWZXqxcqWK-sFJ695Okdd_EJOA,7456
|
56
|
+
apache_airflow_providers_microsoft_azure-12.5.0rc1.dist-info/entry_points.txt,sha256=6iWHenOoUC3YZBb3OKn6g0HlJsV58Ba56i8USmQrcJI,111
|
57
|
+
apache_airflow_providers_microsoft_azure-12.5.0rc1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
58
|
+
apache_airflow_providers_microsoft_azure-12.5.0rc1.dist-info/METADATA,sha256=fiATPGy6wjN_pSwzpMY7dxdGQq12v_NlHMkczeMKyaI,8791
|
59
|
+
apache_airflow_providers_microsoft_azure-12.5.0rc1.dist-info/RECORD,,
|