【问题标题】:Azure Logic App: Continuation token is not supported for queries with GROUP BYAzure 逻辑应用:使用 GROUP BY 的查询不支持继续令牌
【发布时间】:2020-12-05 21:56:44
【问题描述】:

我正在尝试使用 Azure 逻辑应用程序中的 Group By 子句来查询具有 150 万个文档的单个分区。

我可以毫无问题地运行在 Cosmos 数据资源管理器中的逻辑应用程序中编码的查询:

[{
    "AreasProcessed": 1,
    "TotalProperties": 1286,
    "status": 500
},
{
    "AreasProcessed": 45,
    "TotalProperties": 0,
    "status": 400
},
{
    "AreasProcessed": 2275,
    "TotalProperties": 2399469,
    "status": 200
}]

但是,当我在逻辑应用程序中运行查询时,我收到以下错误:

Continuation token is not supported for queries with GROUP BY. Do not use FeedResponse.ResponseContinuation or remove the GROUP BY from the query.

我已在逻辑应用上启用分页和异步模式。

逻辑应用的完整错误如下,谁能帮帮我?

{"error": {
    "code": 500,
    "source": "logic-apis-westeurope.azure-apim.net",
    "clientRequestId": "4d6a4cdb-8969-4dd7-b382-90929c7ec829",
    "message": "BadGateway",
    "innerError": {
        "status": 500,
        "message": "Continuation token is not supported for queries with GROUP BY. Do not use FeedResponse.ResponseContinuation or remove the GROUP BY from the query.\r\nclientRequestId: 4d6a4cdb-8969-4dd7-b382-90929c7ec829",
        "error": {
            "message": "Continuation token is not supported for queries with GROUP BY. Do not use FeedResponse.ResponseContinuation or remove the GROUP BY from the query."
        },
        "source": "documentdb-we.azconn-we.p.azurewebsites.net"
    }
}}

【问题讨论】:

    标签: azure azure-cosmosdb azure-logic-apps


    【解决方案1】:

    据我所知,azure 团队已经集成了“Document Explorer”、“Query Explorer”、“Script Explorer”功能作为“数据资源管理器”的一部分。因此,“Data Explorer”是进行查询的最佳方式。我不确定 azure 逻辑应用程序是否使用与“Query Explorer”或“Document Explorer”相同的后端,但逻辑应用程序似乎没有使用相同的后端使用“数据浏览器”。我认为这就是您可以在门户的“数据资源管理器”中运行查询但无法在逻辑应用中运行查询的原因。

    对于这个问题,你可以create一个天蓝色的函数,用函数中的代码进行查询。然后call 逻辑应用中的函数。这是另一个post,与您的问题相似(但不相同)供您参考。

    【讨论】:

    • 谢谢,快点,我已经使用 Functions 方法作为解决方法,看起来逻辑应用程序用来连接到 CosmosDB 的 SDK 与 Data Explorer 不同,我想知道其他人是否有提出比函数更好的分辨率。感谢您的帮助。
    • 嗨@Weeden 抱歉耽搁了,我不确定是否存在更好的解决方案。是否可以不用sdk自己写查询sql来实现?
    猜你喜欢
    • 1970-01-01
    • 2022-11-02
    • 1970-01-01
    • 1970-01-01
    • 2014-12-03
    • 1970-01-01
    • 2021-04-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多