azure : How to write path to get a file from a time series partitioned folder using the Azure logic apps

标签 azure azure-storage azure-logic-apps azure-storage-explorer

我正在尝试使用逻辑应用从 Azure Blob 存储检索 csv 文件。 我在参数中设置了 azure 存储资源管理器路径,并在获取 blob 内容操作中使用该参数。 Parameter Screenshot

在参数中我将值设置为:

concat('Directory1/','Year=',string(int(substring(utcNow(),0,4))),'/Month=',string(int(substring(utcnow(),5,2))),'/Day=',string(int(substring(utcnow(),8,2))),'/myfile.csv')

因此在运行时该路径应形成为:

Directory1/Year=2019/Month=12/Day=30/myfile.csv

但是在执行过程中操作失败并出现以下错误消息

{
  "status": 400,
  "message": "The specifed resource name contains invalid characters.\r\nclientRequestId: 1e2791be-8efd-413d-831e-7e2cd89278ba",
  "error": {
    "message": "The specifed resource name contains invalid characters."
  },
  "source": "azureblob-we.azconn-we-01.p.azurewebsites.net"
}

所以我的问题是:如何编写路径来从时间序列分区路径中获取数据。

最佳答案

Joy Wang的回答部分正确。
逻辑应用中的参数仅将值视为字符串,并且无法识别 concat() 等任何函数。
使用 concat 函数的正确方法是使用表达式。

expression screenshot 我的问题解决方案是:

concat('container1/','Directory1/','Year=',string(int(substring(utcNow(),0,4))),'/Month=',string(int(substring(utcnow(),5,2))),'/Day=',string(int(substring(utcnow(),8,2))),'/myfile.csv')

关于 azure : How to write path to get a file from a time series partitioned folder using the Azure logic apps,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59551177/

相关文章:

azure - 如何使用 Python 在 Azure Devops 中创建 Wiki 子页面?

r - 如何使用 spark R 列出 Blob azure 中的文件

azure - Azure 中什么算作计费数据传输?

azure - 在 Azure 逻辑应用 API 连接上使用 Azure Key Vault

每个 Blob SAS 的 Azure CDN

Azure 文件共享所有者/组权限在 VM 重新启动时恢复

powershell - 如何列出 Azure 存储容器和 Blob

azure - 如何创建逻辑应用程序将文件从一个容器动态复制到另一个存储 blob 容器?

azure - 逻辑应用程序未接收消息

linux - 自动化 Azure 资源部署的行业标准方法