在我的逻辑应用中,第一步从 Azure 表存储中获取一些已筛选的实体。过滤器由两个条件组成:
- 一个字段必须等于某个常量值
- 其他字段(日期时间)必须小于或等于当前时间减 10 分钟
它一直工作正常,直到上个月它开始返回错误的结果,如下图所示:
编辑模式下的连接器:
我无法弄清楚发生了什么。如果我编辑 Azure 表中的行(只需单击更新而不更改任何内容),它就会开始正常工作。我认为也许该字段设置了错误的类型,但一切似乎都正常:
最佳答案
可能您的错误是由于CreatedDate
类型错误造成的,您可以引用this post .
简单地说,您将时间格式的字符串插入到格式为 DateTime
的 Azure 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/inserting-and-updating-entities
2.将CreatedDate
定义为String
类型,但这不是一个很好的解决方案,最好插入正确的日期时间
数据。
关于Azure 逻辑应用 - GetEntities(Azure 表)连接器筛选器返回错误结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65890505/