繁体   English   中英

如何访问通过 azure 文件共享上传到数据存储区的数据?

[英]How do i access data that has been uploaded to datastore via azure file share?

将一堆 csv 上传到 azure 文件共享数据存储。 如何在脚本中访问数据存储区中的数据?

#upload csv to datastore
datastore = ws.get_default_datastore()
path='path'
target=(datastore,path)
ds=Dataset.File.upload_directory(data_loacation,target,overwrite=True,show_progress = True)

您需要创建 Azure 文件数据存储。 下面是创建 Azure 文件数据存储的示例代码。

from azure.ai.ml.entities import AzureFileDatastore
from azure.ai.ml import MLClient

ml_client = MLClient.from_config()

store = AzureFileDatastore(
    name="file-example",
    description="Datastore pointing to an Azure File Share.",
    account_name="mytestfilestore",
    file_share_name="my-share",
    credentials={
        "account_key": "XXXxxxXXXxXXXXxxXXXXXxXXXXXxXxXXXXxxxxxXXxxxxxxXXXxXXX"
    },
)

ml_client.create_or_update(store)

有关更多信息,请遵循此官方文档

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM