airflow.providers.microsoft.azure.hooks.fileshare
¶
Module Contents¶
Classes¶
Interacts with Azure FileShare Storage. |
- class airflow.providers.microsoft.azure.hooks.fileshare.AzureFileShareHook(azure_fileshare_conn_id='azure_fileshare_default')[source]¶
Bases:
airflow.hooks.base.BaseHook
Interacts with Azure FileShare Storage.
- Parameters
azure_fileshare_conn_id (str) – Reference to the Azure Container Volume connection id of an Azure account of which container volumes should be used.
- check_for_directory(share_name, directory_name, **kwargs)[source]¶
Check if a directory exists on Azure File Share.
- check_for_file(share_name, directory_name, file_name, **kwargs)[source]¶
Check if a file exists on Azure File Share.
- list_directories_and_files(share_name, directory_name=None, **kwargs)[source]¶
Return the list of directories and files stored on a Azure File Share.
- list_files(share_name, directory_name=None, **kwargs)[source]¶
Return the list of files stored on a Azure File Share.
- create_directory(share_name, directory_name, **kwargs)[source]¶
Create a new directory on a Azure File Share.
- get_file(file_path, share_name, directory_name, file_name, **kwargs)[source]¶
Download a file from Azure File Share.
- get_file_to_stream(stream, share_name, directory_name, file_name, **kwargs)[source]¶
Download a file from Azure File Share.
- load_file(file_path, share_name, directory_name, file_name, **kwargs)[source]¶
Upload a file to Azure File Share.
- load_string(string_data, share_name, directory_name, file_name, **kwargs)[source]¶
Upload a string to Azure File Share.
- load_stream(stream, share_name, directory_name, file_name, count, **kwargs)[source]¶
Upload a stream to Azure File Share.
- Parameters
stream (str) – Opened file/stream to upload as the file content.
share_name (str) – Name of the share.
directory_name (str) – Name of the directory.
file_name (str) – Name of the file.
count (str) – Size of the stream in bytes
kwargs – Optional keyword arguments that FileService.create_file_from_stream() takes.
Was this entry helpful?