【问题标题】:Excel Power Query - Is it possible to connect to Azure Blob Storage with SAS authentication or Azure AD accountExcel Power Query - 是否可以使用 SAS 身份验证或 Azure AD 帐户连接到 Azure Blob 存储
【发布时间】:2020-05-26 20:11:30
【问题描述】:

我正在使用 Excel 从 Azure Blob 存储访问容器,我们通过“新查询”进行连接,但只提供了使用帐户密钥访问的选项。

登录后,权限将使用帐户密钥保存在数据源设置中。

使用 Power Query AzureStorage.Blobs (https://docs.microsoft.com/en-us/powerquery-m/azurestorage-blobs) 中的函数从 VBA 访问该 Azure Blob 存储就足够了。

¿是否可以使用 SAS(共享访问签名)令牌或 Azure AD 帐户而不是使用帐户密钥来执行相同的操作?我正在寻找,暂时没有发现任何东西

【问题讨论】:

  • 我不知道 Excel 中的 AAD 选项,但 Power BI 连接器最终支持它(CDM 文件夹视图只是测试版)。如果您的最终目标是仪表板或某个支点,Power BI 可能会为您解决。

标签: excel azure powerquery blobstore azure-blob-storage


【解决方案1】:

是的,您可以使用 sas 连接,但它不是来自 azure 的数据,在我的测试中,它可以使用来自网络的数据。

我生成具有读、写权限并使用 HTTP 协议的 sas url,然后在 excel 中粘贴 url 并将https 替换为http。然后你就可以得到数据了。

如果使用Power Query,选择New Source-> Other Sources-> Web 则同excel获取数据。

【讨论】:

  • 感谢您的回答,我可以访问某个文件并将其加载到工作表中,但我无法像使用 Azure Blob Storage 那样以表格格式列出所有 blob。你知道有什么解决方法吗?
  • not able to list all the blobs in a a table format as I did with the Azure Blob Storage . 是什么意思?请详细描述您的问题。
  • 无法列出容器中特定前缀的所有 blob,所以不要用 Blob 的前缀编写 url。按照你的例子是这样的:myaccount.blob.core.windows.net/test?sas_token
  • 我有一个测试,看起来它无法通过 web 方式列出容器文件,就像您使用无法访问容器 sas url 的浏览器一样。或者也许我使用了错误的方式。
猜你喜欢
  • 2020-11-06
  • 1970-01-01
  • 1970-01-01
  • 2021-07-26
  • 2017-10-30
  • 2022-08-18
  • 1970-01-01
  • 2020-10-19
  • 1970-01-01
相关资源
最近更新 更多