-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes AzureFileShare connection extras (#16388)
* Fixes AzureFileShare connection extras The Azure File Share connection has not been creted in #15159 and it caused an unexpected side effect as the default Azure Connection passed service_options dictionary to FileService with key that was unexpected. This change fixes two things: 1) adds AzureFileShare connection that has separate conn_type and handles the extra_options specific for FileService Hook available in the Airflow UI. 2) handles the "deprecated" way of passing keys without UI prefix but raises a deprecation warning when such key is passed or when the Wasb connection is used with an empty extras rather than Azure File Share. Fixes #16254 * fixup! Fixes AzureFileShare connection extras * fixup! fixup! Fixes AzureFileShare connection extras
- Loading branch information
Showing
17 changed files
with
492 additions
and
341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
...apache-airflow-providers-microsoft-azure/connections/azure_container_volume.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
.. Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
.. http://www.apache.org/licenses/LICENSE-2.0 | ||
.. Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
.. _howto/connection:azure_container_volume: | ||
|
||
Microsoft Azure Container Volume Connection | ||
=========================================== | ||
|
||
The Microsoft Azure Container Volume connection type enables the Azure Container Volume Integrations. | ||
|
||
Authenticating to Azure Container Volume | ||
---------------------------------------- | ||
|
||
There are four ways to connect to Azure Container Volume using Airflow. | ||
|
||
1. Use `token credentials | ||
<https://docs.microsoft.com/en-us/azure/developer/python/azure-sdk-authenticate?tabs=cmd#authenticate-with-token-credentials>`_ | ||
i.e. add specific credentials (client_id, secret) and subscription id to the Airflow connection. | ||
2. Use a `Connection String | ||
<https://docs.microsoft.com/en-us/azure/data-explorer/kusto/api/connection-strings/storage>`_ | ||
i.e. add connection string to ``extra__azure_container_volume__connection_string`` in the Airflow connection. | ||
|
||
Only one authorization method can be used at a time. If you need to manage multiple credentials or keys then you should | ||
configure multiple connections. | ||
|
||
Default Connection IDs | ||
---------------------- | ||
|
||
All hooks and operators related to Azure Container Volume use ``azure_container_volume_default`` by default. | ||
|
||
Configuring the Connection | ||
-------------------------- | ||
|
||
Login (optional) | ||
Specify the login used for azure blob storage. For use with Shared Key Credential and SAS Token authentication. | ||
|
||
Password (optional) | ||
Specify the password used for azure blob storage. For use with | ||
Active Directory (token credential) and shared key authentication. | ||
|
||
Host (optional) | ||
Specify the account url for anonymous public read, Active Directory, shared access key authentication. | ||
|
||
Extra (optional) | ||
Specify the extra parameters (as json dictionary) that can be used in Azure connection. | ||
The following parameters are all optional: | ||
|
||
* ``extra__azure_container_volume__connection_string``: Connection string for use with connection string authentication. | ||
|
||
When specifying the connection in environment variable you should specify | ||
it using URI syntax. | ||
|
||
Note that all components of the URI should be URL-encoded. | ||
|
||
For example connect with token credentials: | ||
|
||
.. code-block:: bash | ||
export AIRFLOW_CONN_WASP_DEFAULT='azure_container_volume://blob%20username:blob%[email protected]' |
Oops, something went wrong.