Azure 逻辑应用 - GetEntities(Azure 表)连接器筛选器返回错误结果

标签 azure azure-logic-apps

在我的逻辑应用中,第一步从 Azure 表存储中获取一些已筛选的实体。过滤器由两个条件组成:

  1. 一个字段必须等于某个常量值
  2. 其他字段(日期时间)必须小于或等于当前时间减 10 分钟

它一直工作正常,直到上个月它开始返回错误的结果,如下图所示: enter image description here

编辑模式下的连接器:

enter image description here

我无法弄清楚发生了什么。如果我编辑 Azure 表中的行(只需单击更新而不更改任何内容),它就会开始正常工作。我认为也许该字段设置了错误的类型,但一切似乎都正常:

enter image description here

最佳答案

可能您的错误是由于CreatedDate类型错误造成的,您可以引用this post .

简单地说,您将时间格式的字符串插入到格式为 DateTimeAzure Table 数据中。这在门户中显示为 DateTime 类型,但它实际上是一个字符串。

解决方案:

1.如果要插入DateTime类型的数据,可以指定odata.type,请引用以下示例:

{  
   "Address":"Mountain View",  
   "Age":23,  
   "AmountDue":200.23,  
   "<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b7f4c2c4c3d8dad2c5f4d8d3d2f7d8d3d6c3d699c3cec7d2" rel="noreferrer noopener nofollow">[email protected]</a>":"Edm.Guid",  
   "CustomerCode":"c9da6455-213d-42c9-9a79-3e9149a57833",  
   "<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="96d5e3e5e2f9fbf3e4c5fff8f5f3d6f9f2f7e2f7b8e2efe6f3" rel="noreferrer noopener nofollow">[email protected]</a>":"Edm.DateTime",  
   "CustomerSince":"2008-07-10T00:00:00",  
   "IsActive":true,  
   "<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="115f647c7374635e775e6375746362517e757065703f65686174" rel="noreferrer noopener nofollow">[email protected]</a>":"Edm.Int64",  
   "NumberOfOrders":"255",  
   "PartitionKey":"mypartitionkey",  
   "RowKey":"myrowkey"  
}  

引用:

https://learn.microsoft.com/en-us/rest/api/storageservices/understanding-the-table-service-data-model#property-types

https://learn.microsoft.com/en-us/rest/api/storageservices/inserting-and-updating-entities

2.CreatedDate定义为String类型,但这不是一个很好的解决方案,最好插入正确的日期时间数据。

关于Azure 逻辑应用 - GetEntities(Azure 表)连接器筛选器返回错误结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65890505/

相关文章:

.net - 使用 Asp.net mvc 以编程方式创建 Azure 服务总线

azure - 使用 DotNet SDK 创建逻辑应用程序和 API 连接 ARM 模板

Azure 逻辑应用表插入导致错误

azure-logic-apps - 能够在 SQL 连接器的逻辑应用程序中使用 KeyVault

java - Azure IoT 中心设备消息、消息正文上的路由筛选器不起作用

用于按计划自动缩放 Function App 的 Azure 自动化和逻辑应用

Azure 应用程序服务 - Docker 组成多容器应用程序 - 无 Docker 日志

用于获取合并请求中已更改文件列表的 Azure Repos REST API

azure - 本地 SQL Server 实例和 Azure SQL Server 中的 LoadData 脚本

Azure 单点登录