【发布时间】:2020-12-08 00:44:40
【问题描述】:
我正在使用适用于 Python 3.8 的 azure-storage-file-datalake 插件。 SDK 在这里进行了深入的描述—— https://docs.microsoft.com/en-us/python/api/azure-storage-file-datalake/azure.storage.filedatalake.datalakedirectoryclient?view=azure-python,但是在哪里没有关于是否可以从数据湖中删除文件的描述,SDK仅描述了删除目录。可以删除文件吗?
编辑:响应给出的答案,我尝试了这个......
file = DataLakeFileClient.from_connection_string(
my_connection_string,
file_system_name=filesystem,
file_path=path
)
file.delete_file()
但最后一行导致此错误
TypeError('element indices must be integers')
【问题讨论】:
-
你好,我想看看你是否解决了这个问题。如果解决了,您能接受下面的答案吗?如果您还有更多问题,请告诉我:)。谢谢。
标签: python-3.x azure azure-data-lake data-lake