我正在使用 Azure 数据块并运行以下 Python 代码:
sas_token = "<my sas key>"
dbutils.fs.mount(
source = "wasbs://<container>@<storageaccount>.blob.core.windows.net",
mount_point = "/mnt/gl",
extra_configs = {"fs.azure.sas.<container>.<storageaccount>.blob.core.windows.net": sas_token})
这似乎运行良好。于是我跑了:
df = spark.read.text("/mnt/gl/glAgg_LE.csv")
这给了我错误:
shaded.databricks.org.apache.hadoop.fs.azure.AzureException: com.microsoft.azure.storage.StorageException: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
不知道我做错了什么。我很确定我的 sas 密钥是正确的。