我的管道有2个活动用于该测试。一个查找活动和一个存储过程,它仅获取查找的输出,然后将其用作执行参数。
我想在正在编写的查询中获得_ts字段(Comos DB Unix时间戳)的最大值。
这是我对来源的查询:
select max(c._ts) AS UnixTimestamp from c
where udf.convertTime(c._ts) >= '@{formatDateTime(addhours(pipeline().TriggerTime, -1), 'yyyy-MM-ddTHH:mm:ssZ' )}'
AND udf.convertTime(c._ts) < '@{formatDateTime(pipeline().TriggerTime, 'yyyy-MM-ddTHH:mm:ssZ' )}'
当我调试时,这是翻译后的输入:
{
"source": {
"type": "DocumentDbCollectionSource",
"query": "select max(c._ts) AS UnixTimestamp from c \nwhere udf.convertTime(c._ts) >= '2018-11-06T18:19:56Z' \nAND udf.convertTime(c._ts) < '2018-11-06T19:19:56Z'",
"nestingSeparator": "."
},
"dataset": {
"referenceName": "SourceComosDB",
"type": "DatasetReference",
"parameters": {}
},
"firstRowOnly": false
}
查找活动的输出结果为:
{
"count": 18,
"value": [
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{}
],
"effectiveIntegrationRuntime": "DefaultIntegrationRuntime (East US 2)"
}
,因此不执行存储过程。
如何获取查询中_ts的最大值?