あなたはextraction function、すべての細かさを設定して動作します/制限をソートするlimitSpecを使用してこれを行うには、クエリでグループを使用するので、__timeでグループすることができます。今すぐtimeseriesクエリを使用したい場合は、最新の10を取得するのが難しいです。それを行う1つの方法は、希望のものに時間を設定してから、間隔を10Hに設定します。時間。これは実現するよりも簡単に言うことができます。あなたが大きなパフォーマンス上の問題がなければ、私は最初の道を行くでしょう。
{
"queryType": "groupBy",
"dataSource": "wikiticker",
"granularity": "all",
"dimensions": [
{
"type": "extraction",
"dimension": "__time",
"outputName": "extract_time",
"extractionFn": {
"type": "timeFormat"
}
},
],
"limitSpec": {
"type": "default",
"limit": 10,
"columns": [
{
"dimension": "extract_time",
"direction": "descending"
}
]
},
"aggregations": [
{
"type": "count",
"name": "$f2"
},
{
"type": "longMax",
"name": "$f3",
"fieldName": "added"
}
],
"intervals": [
"1900-01-01T00:00:00.000/3000-01-01T00:00:00.000"
]
}
スリムあなたは例のクエリを書くことができますか? –