dbls mount文件

mount脚本

app_id = 'c9a7266a-034d-43df-89ad-bbaa35267478'
tenant_id = 'eef727ff-82de-4c60-902b-830774836bfe'
secret = 'add-when-use'

configs = {"fs.azure.account.auth.type": "OAuth",
          "fs.azure.account.oauth.provider.type": "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider",
          "fs.azure.account.oauth2.client.id": app_id,
          "fs.azure.account.oauth2.client.secret": secret,
          "fs.azure.account.oauth2.client.endpoint": f"https://login.chinacloudapi.cn/{tenant_id}/oauth2/token"}

dbutils.fs.mount(
  source = "abfss://data@sadapdevhdp01.dfs.core.chinacloudapi.cn/",
  mount_point = "/mnt/data",
  extra_configs = configs)

posted @ 2023-07-17 10:24  半个程序猿Cohen_Lee  阅读(19)  评论(0编辑  收藏  举报