apache-airflow-providers-microsoft-azure 6.1.1rc1__py3-none-any.whl → 6.1.2rc1__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/get_provider_info.py +11 -0
- airflow/providers/microsoft/azure/hooks/adx.py +3 -3
- airflow/providers/microsoft/azure/hooks/asb.py +25 -24
- airflow/providers/microsoft/azure/hooks/base_azure.py +2 -2
- airflow/providers/microsoft/azure/hooks/batch.py +14 -14
- airflow/providers/microsoft/azure/hooks/container_instance.py +7 -7
- airflow/providers/microsoft/azure/hooks/container_registry.py +2 -2
- airflow/providers/microsoft/azure/hooks/container_volume.py +4 -4
- airflow/providers/microsoft/azure/hooks/cosmos.py +5 -5
- airflow/providers/microsoft/azure/hooks/data_factory.py +8 -8
- airflow/providers/microsoft/azure/hooks/data_lake.py +39 -55
- airflow/providers/microsoft/azure/hooks/fileshare.py +2 -2
- airflow/providers/microsoft/azure/hooks/synapse.py +2 -2
- airflow/providers/microsoft/azure/hooks/wasb.py +8 -8
- airflow/providers/microsoft/azure/log/wasb_task_handler.py +5 -4
- airflow/providers/microsoft/azure/operators/adls.py +1 -1
- airflow/providers/microsoft/azure/operators/adx.py +6 -4
- airflow/providers/microsoft/azure/operators/asb.py +20 -35
- airflow/providers/microsoft/azure/operators/batch.py +2 -2
- airflow/providers/microsoft/azure/operators/container_instances.py +1 -1
- airflow/providers/microsoft/azure/operators/cosmos.py +4 -3
- airflow/providers/microsoft/azure/secrets/key_vault.py +4 -4
- airflow/providers/microsoft/azure/sensors/cosmos.py +2 -3
- airflow/providers/microsoft/azure/sensors/data_factory.py +4 -2
- airflow/providers/microsoft/azure/sensors/wasb.py +8 -4
- airflow/providers/microsoft/azure/transfers/azure_blob_to_gcs.py +1 -5
- airflow/providers/microsoft/azure/transfers/local_to_adls.py +1 -1
- airflow/providers/microsoft/azure/transfers/oracle_to_azure_data_lake.py +4 -6
- airflow/providers/microsoft/azure/transfers/sftp_to_wasb.py +3 -3
- airflow/providers/microsoft/azure/triggers/data_factory.py +6 -8
- {apache_airflow_providers_microsoft_azure-6.1.1rc1.dist-info → apache_airflow_providers_microsoft_azure-6.1.2rc1.dist-info}/METADATA +28 -7
- apache_airflow_providers_microsoft_azure-6.1.2rc1.dist-info/RECORD +51 -0
- apache_airflow_providers_microsoft_azure-6.1.1rc1.dist-info/RECORD +0 -51
- {apache_airflow_providers_microsoft_azure-6.1.1rc1.dist-info → apache_airflow_providers_microsoft_azure-6.1.2rc1.dist-info}/LICENSE +0 -0
- {apache_airflow_providers_microsoft_azure-6.1.1rc1.dist-info → apache_airflow_providers_microsoft_azure-6.1.2rc1.dist-info}/NOTICE +0 -0
- {apache_airflow_providers_microsoft_azure-6.1.1rc1.dist-info → apache_airflow_providers_microsoft_azure-6.1.2rc1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_microsoft_azure-6.1.1rc1.dist-info → apache_airflow_providers_microsoft_azure-6.1.2rc1.dist-info}/entry_points.txt +0 -0
- {apache_airflow_providers_microsoft_azure-6.1.1rc1.dist-info → apache_airflow_providers_microsoft_azure-6.1.2rc1.dist-info}/top_level.txt +0 -0
@@ -29,6 +29,7 @@ def get_provider_info():
|
|
29
29
|
"description": "`Microsoft Azure <https://azure.microsoft.com/>`__\n",
|
30
30
|
"suspended": False,
|
31
31
|
"versions": [
|
32
|
+
"6.1.2",
|
32
33
|
"6.1.1",
|
33
34
|
"6.1.0",
|
34
35
|
"6.0.0",
|
@@ -276,6 +277,16 @@ def get_provider_info():
|
|
276
277
|
"python-modules": ["airflow.providers.microsoft.azure.hooks.synapse"],
|
277
278
|
},
|
278
279
|
],
|
280
|
+
"triggers": [
|
281
|
+
{
|
282
|
+
"integration-name": "Microsoft Azure Data Factory",
|
283
|
+
"python-modules": ["airflow.providers.microsoft.azure.triggers.data_factory"],
|
284
|
+
},
|
285
|
+
{
|
286
|
+
"integration-name": "Microsoft Azure Blob Storage",
|
287
|
+
"python-modules": ["airflow.providers.microsoft.azure.triggers.wasb"],
|
288
|
+
},
|
289
|
+
],
|
279
290
|
"transfers": [
|
280
291
|
{
|
281
292
|
"source-integration-name": "Local",
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"""
|
19
19
|
This module contains Azure Data Explorer hook.
|
20
20
|
|
21
|
-
.. spelling::
|
21
|
+
.. spelling:word-list::
|
22
22
|
|
23
23
|
KustoResponseDataSetV
|
24
24
|
kusto
|
@@ -78,7 +78,7 @@ class AzureDataExplorerHook(BaseHook):
|
|
78
78
|
|
79
79
|
@staticmethod
|
80
80
|
def get_connection_form_widgets() -> dict[str, Any]:
|
81
|
-
"""Returns connection widgets to add to connection form"""
|
81
|
+
"""Returns connection widgets to add to connection form."""
|
82
82
|
from flask_appbuilder.fieldwidgets import BS3PasswordFieldWidget, BS3TextFieldWidget
|
83
83
|
from flask_babel import lazy_gettext
|
84
84
|
from wtforms import PasswordField, StringField
|
@@ -97,7 +97,7 @@ class AzureDataExplorerHook(BaseHook):
|
|
97
97
|
@staticmethod
|
98
98
|
@_ensure_prefixes(conn_type="azure_data_explorer")
|
99
99
|
def get_ui_field_behaviour() -> dict[str, Any]:
|
100
|
-
"""Returns custom field behaviour"""
|
100
|
+
"""Returns custom field behaviour."""
|
101
101
|
return {
|
102
102
|
"hidden_fields": ["schema", "port", "extra"],
|
103
103
|
"relabeling": {
|
@@ -26,7 +26,7 @@ from airflow.hooks.base import BaseHook
|
|
26
26
|
|
27
27
|
class BaseAzureServiceBusHook(BaseHook):
|
28
28
|
"""
|
29
|
-
BaseAzureServiceBusHook class to create session and create connection using connection string
|
29
|
+
BaseAzureServiceBusHook class to create session and create connection using connection string.
|
30
30
|
|
31
31
|
:param azure_service_bus_conn_id: Reference to the
|
32
32
|
:ref:`Azure Service Bus connection<howto/connection:azure_service_bus>`.
|
@@ -39,7 +39,7 @@ class BaseAzureServiceBusHook(BaseHook):
|
|
39
39
|
|
40
40
|
@staticmethod
|
41
41
|
def get_ui_field_behaviour() -> dict[str, Any]:
|
42
|
-
"""Returns custom field behaviour"""
|
42
|
+
"""Returns custom field behaviour."""
|
43
43
|
return {
|
44
44
|
"hidden_fields": ["port", "host", "extra", "login", "password"],
|
45
45
|
"relabeling": {"schema": "Connection String"},
|
@@ -57,17 +57,17 @@ class BaseAzureServiceBusHook(BaseHook):
|
|
57
57
|
|
58
58
|
|
59
59
|
class AdminClientHook(BaseAzureServiceBusHook):
|
60
|
-
"""
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
from the base class
|
60
|
+
"""Interact with the ServiceBusAdministrationClient.
|
61
|
+
|
62
|
+
This can create, update, list, and delete resources of a Service Bus
|
63
|
+
namespace. This hook uses the same Azure Service Bus client connection
|
64
|
+
inherited from the base class.
|
65
65
|
"""
|
66
66
|
|
67
67
|
def get_conn(self) -> ServiceBusAdministrationClient:
|
68
|
-
"""
|
69
|
-
|
70
|
-
string in connection details
|
68
|
+
"""Create a ServiceBusAdministrationClient instance.
|
69
|
+
|
70
|
+
This uses the connection string in connection details.
|
71
71
|
"""
|
72
72
|
conn = self.get_connection(self.conn_id)
|
73
73
|
|
@@ -82,7 +82,7 @@ class AdminClientHook(BaseAzureServiceBusHook):
|
|
82
82
|
enable_batched_operations: bool = True,
|
83
83
|
) -> QueueProperties:
|
84
84
|
"""
|
85
|
-
Create Queue by connecting to service Bus Admin client return the QueueProperties
|
85
|
+
Create Queue by connecting to service Bus Admin client return the QueueProperties.
|
86
86
|
|
87
87
|
:param queue_name: The name of the queue or a QueueProperties with name.
|
88
88
|
:param max_delivery_count: The maximum delivery count. A message is automatically
|
@@ -106,7 +106,7 @@ class AdminClientHook(BaseAzureServiceBusHook):
|
|
106
106
|
|
107
107
|
def delete_queue(self, queue_name: str) -> None:
|
108
108
|
"""
|
109
|
-
Delete the queue by queue_name in service bus namespace
|
109
|
+
Delete the queue by queue_name in service bus namespace.
|
110
110
|
|
111
111
|
:param queue_name: The name of the queue or a QueueProperties with name.
|
112
112
|
"""
|
@@ -118,7 +118,7 @@ class AdminClientHook(BaseAzureServiceBusHook):
|
|
118
118
|
|
119
119
|
def delete_subscription(self, subscription_name: str, topic_name: str) -> None:
|
120
120
|
"""
|
121
|
-
Delete a topic subscription entities under a ServiceBus Namespace
|
121
|
+
Delete a topic subscription entities under a ServiceBus Namespace.
|
122
122
|
|
123
123
|
:param subscription_name: The subscription name that will own the rule in topic
|
124
124
|
:param topic_name: The topic that will own the subscription rule.
|
@@ -134,13 +134,13 @@ class AdminClientHook(BaseAzureServiceBusHook):
|
|
134
134
|
|
135
135
|
|
136
136
|
class MessageHook(BaseAzureServiceBusHook):
|
137
|
-
"""
|
138
|
-
|
139
|
-
for getting ServiceBusSender and ServiceBusReceiver.
|
137
|
+
"""Interact with ServiceBusClient.
|
138
|
+
|
139
|
+
This acts as a high level interface for getting ServiceBusSender and ServiceBusReceiver.
|
140
140
|
"""
|
141
141
|
|
142
142
|
def get_conn(self) -> ServiceBusClient:
|
143
|
-
"""Create and returns ServiceBusClient by using the connection string in connection details"""
|
143
|
+
"""Create and returns ServiceBusClient by using the connection string in connection details."""
|
144
144
|
conn = self.get_connection(self.conn_id)
|
145
145
|
connection_string: str = str(conn.schema)
|
146
146
|
|
@@ -148,9 +148,9 @@ class MessageHook(BaseAzureServiceBusHook):
|
|
148
148
|
return ServiceBusClient.from_connection_string(conn_str=connection_string, logging_enable=True)
|
149
149
|
|
150
150
|
def send_message(self, queue_name: str, messages: str | list[str], batch_message_flag: bool = False):
|
151
|
-
"""
|
152
|
-
|
153
|
-
batch_message_flag it enables and send message as batch message
|
151
|
+
"""Use ServiceBusClient Send to send message(s) to a Service Bus Queue.
|
152
|
+
|
153
|
+
By using ``batch_message_flag``, it enables and send message as batch message.
|
154
154
|
|
155
155
|
:param queue_name: The name of the queue or a QueueProperties with name.
|
156
156
|
:param messages: Message which needs to be sent to the queue. It can be string or list of string.
|
@@ -193,7 +193,7 @@ class MessageHook(BaseAzureServiceBusHook):
|
|
193
193
|
self, queue_name, max_message_count: int | None = 1, max_wait_time: float | None = None
|
194
194
|
):
|
195
195
|
"""
|
196
|
-
Receive a batch of messages at once in a specified Queue name
|
196
|
+
Receive a batch of messages at once in a specified Queue name.
|
197
197
|
|
198
198
|
:param queue_name: The name of the queue name or a QueueProperties with name.
|
199
199
|
:param max_message_count: Maximum number of messages in the batch.
|
@@ -220,9 +220,10 @@ class MessageHook(BaseAzureServiceBusHook):
|
|
220
220
|
max_message_count: int | None,
|
221
221
|
max_wait_time: float | None,
|
222
222
|
):
|
223
|
-
"""
|
224
|
-
|
225
|
-
|
223
|
+
"""Receive a batch of subscription message at once.
|
224
|
+
|
225
|
+
This approach is optimal if you wish to process multiple messages
|
226
|
+
simultaneously, or perform an ad-hoc receive as a single call.
|
226
227
|
|
227
228
|
:param subscription_name: The subscription name that will own the rule in topic
|
228
229
|
:param topic_name: The topic that will own the subscription rule.
|
@@ -42,7 +42,7 @@ class AzureBaseHook(BaseHook):
|
|
42
42
|
|
43
43
|
@staticmethod
|
44
44
|
def get_connection_form_widgets() -> dict[str, Any]:
|
45
|
-
"""Returns connection widgets to add to connection form"""
|
45
|
+
"""Returns connection widgets to add to connection form."""
|
46
46
|
from flask_appbuilder.fieldwidgets import BS3TextFieldWidget
|
47
47
|
from flask_babel import lazy_gettext
|
48
48
|
from wtforms import StringField
|
@@ -58,7 +58,7 @@ class AzureBaseHook(BaseHook):
|
|
58
58
|
|
59
59
|
@staticmethod
|
60
60
|
def get_ui_field_behaviour() -> dict[str, Any]:
|
61
|
-
"""Returns custom field behaviour"""
|
61
|
+
"""Returns custom field behaviour."""
|
62
62
|
import json
|
63
63
|
|
64
64
|
return {
|
@@ -33,7 +33,7 @@ from airflow.utils import timezone
|
|
33
33
|
|
34
34
|
class AzureBatchHook(BaseHook):
|
35
35
|
"""
|
36
|
-
Hook for Azure Batch APIs
|
36
|
+
Hook for Azure Batch APIs.
|
37
37
|
|
38
38
|
:param azure_batch_conn_id: :ref:`Azure Batch connection id<howto/connection:azure_batch>`
|
39
39
|
of a service principal which will be used to start the container instance.
|
@@ -54,7 +54,7 @@ class AzureBatchHook(BaseHook):
|
|
54
54
|
|
55
55
|
@staticmethod
|
56
56
|
def get_connection_form_widgets() -> dict[str, Any]:
|
57
|
-
"""Returns connection widgets to add to connection form"""
|
57
|
+
"""Returns connection widgets to add to connection form."""
|
58
58
|
from flask_appbuilder.fieldwidgets import BS3TextFieldWidget
|
59
59
|
from flask_babel import lazy_gettext
|
60
60
|
from wtforms import StringField
|
@@ -65,7 +65,7 @@ class AzureBatchHook(BaseHook):
|
|
65
65
|
|
66
66
|
@staticmethod
|
67
67
|
def get_ui_field_behaviour() -> dict[str, Any]:
|
68
|
-
"""Returns custom field behaviour"""
|
68
|
+
"""Returns custom field behaviour."""
|
69
69
|
return {
|
70
70
|
"hidden_fields": ["schema", "port", "host", "extra"],
|
71
71
|
"relabeling": {
|
@@ -80,13 +80,13 @@ class AzureBatchHook(BaseHook):
|
|
80
80
|
self.connection = self.get_conn()
|
81
81
|
|
82
82
|
def _connection(self) -> Connection:
|
83
|
-
"""Get connected to Azure Batch service"""
|
83
|
+
"""Get connected to Azure Batch service."""
|
84
84
|
conn = self.get_connection(self.conn_id)
|
85
85
|
return conn
|
86
86
|
|
87
87
|
def get_conn(self):
|
88
88
|
"""
|
89
|
-
Get the Batch client connection
|
89
|
+
Get the Batch client connection.
|
90
90
|
|
91
91
|
:return: Azure Batch client
|
92
92
|
"""
|
@@ -118,7 +118,7 @@ class AzureBatchHook(BaseHook):
|
|
118
118
|
**kwargs,
|
119
119
|
) -> PoolAddParameter:
|
120
120
|
"""
|
121
|
-
Configures a pool
|
121
|
+
Configures a pool.
|
122
122
|
|
123
123
|
:param pool_id: A string that uniquely identifies the Pool within the Account
|
124
124
|
|
@@ -203,7 +203,7 @@ class AzureBatchHook(BaseHook):
|
|
203
203
|
|
204
204
|
def create_pool(self, pool: PoolAddParameter) -> None:
|
205
205
|
"""
|
206
|
-
Creates a pool if not already existing
|
206
|
+
Creates a pool if not already existing.
|
207
207
|
|
208
208
|
:param pool: the pool object to create
|
209
209
|
|
@@ -225,7 +225,7 @@ class AzureBatchHook(BaseHook):
|
|
225
225
|
sku_starts_with: str | None = None,
|
226
226
|
) -> tuple:
|
227
227
|
"""
|
228
|
-
Get latest verified image vm and sku
|
228
|
+
Get latest verified image vm and sku.
|
229
229
|
|
230
230
|
:param publisher: The publisher of the Azure Virtual Machines Marketplace Image.
|
231
231
|
For example, Canonical or MicrosoftWindowsServer.
|
@@ -250,7 +250,7 @@ class AzureBatchHook(BaseHook):
|
|
250
250
|
|
251
251
|
def wait_for_all_node_state(self, pool_id: str, node_state: set) -> list:
|
252
252
|
"""
|
253
|
-
Wait for all nodes in a pool to reach given states
|
253
|
+
Wait for all nodes in a pool to reach given states.
|
254
254
|
|
255
255
|
:param pool_id: A string that identifies the pool
|
256
256
|
:param node_state: A set of batch_models.ComputeNodeState
|
@@ -278,7 +278,7 @@ class AzureBatchHook(BaseHook):
|
|
278
278
|
**kwargs,
|
279
279
|
) -> JobAddParameter:
|
280
280
|
"""
|
281
|
-
Configures a job for use in the pool
|
281
|
+
Configures a job for use in the pool.
|
282
282
|
|
283
283
|
:param job_id: A string that uniquely identifies the job within the account
|
284
284
|
:param pool_id: A string that identifies the pool
|
@@ -294,7 +294,7 @@ class AzureBatchHook(BaseHook):
|
|
294
294
|
|
295
295
|
def create_job(self, job: JobAddParameter) -> None:
|
296
296
|
"""
|
297
|
-
Creates a job in the pool
|
297
|
+
Creates a job in the pool.
|
298
298
|
|
299
299
|
:param job: The job object to create
|
300
300
|
"""
|
@@ -316,7 +316,7 @@ class AzureBatchHook(BaseHook):
|
|
316
316
|
**kwargs,
|
317
317
|
) -> TaskAddParameter:
|
318
318
|
"""
|
319
|
-
Creates a task
|
319
|
+
Creates a task.
|
320
320
|
|
321
321
|
:param task_id: A string that identifies the task to create
|
322
322
|
:param command_line: The command line of the Task.
|
@@ -338,7 +338,7 @@ class AzureBatchHook(BaseHook):
|
|
338
338
|
|
339
339
|
def add_single_task_to_job(self, job_id: str, task: TaskAddParameter) -> None:
|
340
340
|
"""
|
341
|
-
Add a single task to given job if it doesn't exist
|
341
|
+
Add a single task to given job if it doesn't exist.
|
342
342
|
|
343
343
|
:param job_id: A string that identifies the given job
|
344
344
|
:param task: The task to add
|
@@ -354,7 +354,7 @@ class AzureBatchHook(BaseHook):
|
|
354
354
|
|
355
355
|
def wait_for_job_tasks_to_complete(self, job_id: str, timeout: int) -> list[batch_models.CloudTask]:
|
356
356
|
"""
|
357
|
-
Wait for tasks in a particular job to complete
|
357
|
+
Wait for tasks in a particular job to complete.
|
358
358
|
|
359
359
|
:param job_id: A string that identifies the job
|
360
360
|
:param timeout: The amount of time to wait before timing out in minutes
|
@@ -51,7 +51,7 @@ class AzureContainerInstanceHook(AzureBaseHook):
|
|
51
51
|
|
52
52
|
def create_or_update(self, resource_group: str, name: str, container_group: ContainerGroup) -> None:
|
53
53
|
"""
|
54
|
-
Create a new container group
|
54
|
+
Create a new container group.
|
55
55
|
|
56
56
|
:param resource_group: the name of the resource group
|
57
57
|
:param name: the name of the container group
|
@@ -61,7 +61,7 @@ class AzureContainerInstanceHook(AzureBaseHook):
|
|
61
61
|
|
62
62
|
def get_state_exitcode_details(self, resource_group: str, name: str) -> tuple:
|
63
63
|
"""
|
64
|
-
Get the state and exitcode of a container group
|
64
|
+
Get the state and exitcode of a container group.
|
65
65
|
|
66
66
|
:param resource_group: the name of the resource group
|
67
67
|
:param name: the name of the container group
|
@@ -79,7 +79,7 @@ class AzureContainerInstanceHook(AzureBaseHook):
|
|
79
79
|
|
80
80
|
def get_messages(self, resource_group: str, name: str) -> list:
|
81
81
|
"""
|
82
|
-
Get the messages of a container group
|
82
|
+
Get the messages of a container group.
|
83
83
|
|
84
84
|
:param resource_group: the name of the resource group
|
85
85
|
:param name: the name of the container group
|
@@ -96,7 +96,7 @@ class AzureContainerInstanceHook(AzureBaseHook):
|
|
96
96
|
|
97
97
|
def get_state(self, resource_group: str, name: str) -> ContainerGroup:
|
98
98
|
"""
|
99
|
-
Get the state of a container group
|
99
|
+
Get the state of a container group.
|
100
100
|
|
101
101
|
:param resource_group: the name of the resource group
|
102
102
|
:param name: the name of the container group
|
@@ -106,7 +106,7 @@ class AzureContainerInstanceHook(AzureBaseHook):
|
|
106
106
|
|
107
107
|
def get_logs(self, resource_group: str, name: str, tail: int = 1000) -> list:
|
108
108
|
"""
|
109
|
-
Get the tail from logs of a container group
|
109
|
+
Get the tail from logs of a container group.
|
110
110
|
|
111
111
|
:param resource_group: the name of the resource group
|
112
112
|
:param name: the name of the container group
|
@@ -118,7 +118,7 @@ class AzureContainerInstanceHook(AzureBaseHook):
|
|
118
118
|
|
119
119
|
def delete(self, resource_group: str, name: str) -> None:
|
120
120
|
"""
|
121
|
-
Delete a container group
|
121
|
+
Delete a container group.
|
122
122
|
|
123
123
|
:param resource_group: the name of the resource group
|
124
124
|
:param name: the name of the container group
|
@@ -127,7 +127,7 @@ class AzureContainerInstanceHook(AzureBaseHook):
|
|
127
127
|
|
128
128
|
def exists(self, resource_group: str, name: str) -> bool:
|
129
129
|
"""
|
130
|
-
Test if a container group exists
|
130
|
+
Test if a container group exists.
|
131
131
|
|
132
132
|
:param resource_group: the name of the resource group
|
133
133
|
:param name: the name of the container group
|
@@ -15,7 +15,7 @@
|
|
15
15
|
# KIND, either express or implied. See the License for the
|
16
16
|
# specific language governing permissions and limitations
|
17
17
|
# under the License.
|
18
|
-
"""Hook for Azure Container Registry"""
|
18
|
+
"""Hook for Azure Container Registry."""
|
19
19
|
from __future__ import annotations
|
20
20
|
|
21
21
|
from typing import Any
|
@@ -41,7 +41,7 @@ class AzureContainerRegistryHook(BaseHook):
|
|
41
41
|
|
42
42
|
@staticmethod
|
43
43
|
def get_ui_field_behaviour() -> dict[str, Any]:
|
44
|
-
"""Returns custom field behaviour"""
|
44
|
+
"""Returns custom field behaviour."""
|
45
45
|
return {
|
46
46
|
"hidden_fields": ["schema", "port", "extra"],
|
47
47
|
"relabeling": {
|
@@ -53,7 +53,7 @@ class AzureContainerVolumeHook(BaseHook):
|
|
53
53
|
|
54
54
|
@staticmethod
|
55
55
|
def get_connection_form_widgets() -> dict[str, Any]:
|
56
|
-
"""Returns connection widgets to add to connection form"""
|
56
|
+
"""Returns connection widgets to add to connection form."""
|
57
57
|
from flask_appbuilder.fieldwidgets import BS3PasswordFieldWidget
|
58
58
|
from flask_babel import lazy_gettext
|
59
59
|
from wtforms import PasswordField
|
@@ -67,7 +67,7 @@ class AzureContainerVolumeHook(BaseHook):
|
|
67
67
|
@staticmethod
|
68
68
|
@_ensure_prefixes(conn_type="azure_container_volume")
|
69
69
|
def get_ui_field_behaviour() -> dict[str, Any]:
|
70
|
-
"""Returns custom field behaviour"""
|
70
|
+
"""Returns custom field behaviour."""
|
71
71
|
return {
|
72
72
|
"hidden_fields": ["schema", "port", "host", "extra"],
|
73
73
|
"relabeling": {
|
@@ -82,7 +82,7 @@ class AzureContainerVolumeHook(BaseHook):
|
|
82
82
|
}
|
83
83
|
|
84
84
|
def get_storagekey(self) -> str:
|
85
|
-
"""Get Azure File Volume storage key"""
|
85
|
+
"""Get Azure File Volume storage key."""
|
86
86
|
conn = self.get_connection(self.conn_id)
|
87
87
|
extras = conn.extra_dejson
|
88
88
|
connection_string = self._get_field(extras, "connection_string")
|
@@ -96,7 +96,7 @@ class AzureContainerVolumeHook(BaseHook):
|
|
96
96
|
def get_file_volume(
|
97
97
|
self, mount_name: str, share_name: str, storage_account_name: str, read_only: bool = False
|
98
98
|
) -> Volume:
|
99
|
-
"""Get Azure File Volume"""
|
99
|
+
"""Get Azure File Volume."""
|
100
100
|
return Volume(
|
101
101
|
name=mount_name,
|
102
102
|
azure_file=AzureFileVolume(
|
@@ -56,7 +56,7 @@ class AzureCosmosDBHook(BaseHook):
|
|
56
56
|
|
57
57
|
@staticmethod
|
58
58
|
def get_connection_form_widgets() -> dict[str, Any]:
|
59
|
-
"""Returns connection widgets to add to connection form"""
|
59
|
+
"""Returns connection widgets to add to connection form."""
|
60
60
|
from flask_appbuilder.fieldwidgets import BS3TextFieldWidget
|
61
61
|
from flask_babel import lazy_gettext
|
62
62
|
from wtforms import StringField
|
@@ -73,7 +73,7 @@ class AzureCosmosDBHook(BaseHook):
|
|
73
73
|
@staticmethod
|
74
74
|
@_ensure_prefixes(conn_type="azure_cosmos") # todo: remove when min airflow version >= 2.5
|
75
75
|
def get_ui_field_behaviour() -> dict[str, Any]:
|
76
|
-
"""Returns custom field behaviour"""
|
76
|
+
"""Returns custom field behaviour."""
|
77
77
|
return {
|
78
78
|
"hidden_fields": ["schema", "port", "host", "extra"],
|
79
79
|
"relabeling": {
|
@@ -357,15 +357,15 @@ class AzureCosmosDBHook(BaseHook):
|
|
357
357
|
|
358
358
|
|
359
359
|
def get_database_link(database_id: str) -> str:
|
360
|
-
"""Get Azure CosmosDB database link"""
|
360
|
+
"""Get Azure CosmosDB database link."""
|
361
361
|
return "dbs/" + database_id
|
362
362
|
|
363
363
|
|
364
364
|
def get_collection_link(database_id: str, collection_id: str) -> str:
|
365
|
-
"""Get Azure CosmosDB collection link"""
|
365
|
+
"""Get Azure CosmosDB collection link."""
|
366
366
|
return get_database_link(database_id) + "/colls/" + collection_id
|
367
367
|
|
368
368
|
|
369
369
|
def get_document_link(database_id: str, collection_id: str, document_id: str) -> str:
|
370
|
-
"""Get Azure CosmosDB document link"""
|
370
|
+
"""Get Azure CosmosDB document link."""
|
371
371
|
return get_collection_link(database_id, collection_id) + "/docs/" + document_id
|
@@ -14,9 +14,9 @@
|
|
14
14
|
# KIND, either express or implied. See the License for the
|
15
15
|
# specific language governing permissions and limitations
|
16
16
|
# under the License.
|
17
|
-
"""
|
18
|
-
.. spelling::
|
17
|
+
"""Spelling exceptions.
|
19
18
|
|
19
|
+
.. spelling:word-list::
|
20
20
|
CreateRunResponse
|
21
21
|
DatasetResource
|
22
22
|
LinkedServiceResource
|
@@ -157,7 +157,7 @@ class AzureDataFactoryHook(BaseHook):
|
|
157
157
|
|
158
158
|
@staticmethod
|
159
159
|
def get_connection_form_widgets() -> dict[str, Any]:
|
160
|
-
"""Returns connection widgets to add to connection form"""
|
160
|
+
"""Returns connection widgets to add to connection form."""
|
161
161
|
from flask_appbuilder.fieldwidgets import BS3TextFieldWidget
|
162
162
|
from flask_babel import lazy_gettext
|
163
163
|
from wtforms import StringField
|
@@ -173,7 +173,7 @@ class AzureDataFactoryHook(BaseHook):
|
|
173
173
|
|
174
174
|
@staticmethod
|
175
175
|
def get_ui_field_behaviour() -> dict[str, Any]:
|
176
|
-
"""Returns custom field behaviour"""
|
176
|
+
"""Returns custom field behaviour."""
|
177
177
|
return {
|
178
178
|
"hidden_fields": ["schema", "port", "host", "extra"],
|
179
179
|
"relabeling": {
|
@@ -1088,7 +1088,7 @@ def provide_targeted_factory_async(func: T) -> T:
|
|
1088
1088
|
|
1089
1089
|
class AzureDataFactoryAsyncHook(AzureDataFactoryHook):
|
1090
1090
|
"""
|
1091
|
-
An Async Hook that connects to Azure DataFactory to perform pipeline operations
|
1091
|
+
An Async Hook that connects to Azure DataFactory to perform pipeline operations.
|
1092
1092
|
|
1093
1093
|
:param azure_data_factory_conn_id: The :ref:`Azure Data Factory connection id<howto/connection:adf>`.
|
1094
1094
|
"""
|
@@ -1101,7 +1101,7 @@ class AzureDataFactoryAsyncHook(AzureDataFactoryHook):
|
|
1101
1101
|
super().__init__(azure_data_factory_conn_id=azure_data_factory_conn_id)
|
1102
1102
|
|
1103
1103
|
async def get_async_conn(self) -> AsyncDataFactoryManagementClient:
|
1104
|
-
"""Get async connection and connect to azure data factory"""
|
1104
|
+
"""Get async connection and connect to azure data factory."""
|
1105
1105
|
if self._async_conn is not None:
|
1106
1106
|
return self._async_conn
|
1107
1107
|
|
@@ -1141,7 +1141,7 @@ class AzureDataFactoryAsyncHook(AzureDataFactoryHook):
|
|
1141
1141
|
**config: Any,
|
1142
1142
|
) -> PipelineRun:
|
1143
1143
|
"""
|
1144
|
-
Connect to Azure Data Factory asynchronously to get the pipeline run details by run id
|
1144
|
+
Connect to Azure Data Factory asynchronously to get the pipeline run details by run id.
|
1145
1145
|
|
1146
1146
|
:param run_id: The pipeline run identifier.
|
1147
1147
|
:param resource_group_name: The resource group name.
|
@@ -1159,7 +1159,7 @@ class AzureDataFactoryAsyncHook(AzureDataFactoryHook):
|
|
1159
1159
|
self, run_id: str, resource_group_name: str | None = None, factory_name: str | None = None
|
1160
1160
|
) -> str:
|
1161
1161
|
"""
|
1162
|
-
Connect to Azure Data Factory asynchronously and get the pipeline status by run_id
|
1162
|
+
Connect to Azure Data Factory asynchronously and get the pipeline status by run_id.
|
1163
1163
|
|
1164
1164
|
:param run_id: The pipeline run identifier.
|
1165
1165
|
:param resource_group_name: The resource group name.
|