Azure / Azure/azure-rest-api-specs
Are the TSI Gen2 query examples not entirely correct ?
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 424
Description
I believe there are some errors in the example Timeseries Insights queries that are listed [here](https://docs.microsoft.com/en-us/rest/api/time-series-insights/dataaccessgen2/query/execute#examples)
For instance:
## [ColdStoreQueryGetSeriesPage1](https://docs.microsoft.com/en-us/rest/api/time-series-insights/dataaccessgen2/query/execute#coldstorequerygetseriespage1)
This is a `getSeries` query, but the example shows an inline variable with an aggregation:
```json
{
"getSeries": {
"timeSeriesId": [
"006dfc2d-0324-4937-998c-d16f3b4f1952",
"T1"
],
"searchSpan": {
"from": "2016-08-01T00:00:00Z",
"to": "2016-08-01T00:16:50Z"
},
"filter": null,
"inlineVariables": {
"temperatures": {
"kind": "numeric",
"value": {
"tsx": "$event.Temperature"
},
"filter": null,
"aggregation": {
"tsx": "avg($value)"
}
}
},
"projectedVariables": [
"temperatures"
]
}
}
```
AFAIK, when performing aggregations, you'll need to use the `aggregateSeries` ?
(There are other examples present for `getSeries` queries which also specify aggregations
## [QueryAggregateSeriesWithSampleInterpolation](https://docs.microsoft.com/en-us/rest/api/time-series-insights/dataaccessgen2/query/execute#queryaggregateserieswithsampleinterpolation)
For this example, I would expect that the output of the Linear interpolation would be step interpolated, and the output for the Step interpolation would be linear ?
Contributor guide
Research direction
Start with the linked Execute API examples, especially ColdStoreQueryGetSeriesPage1 and QueryAggregateSeriesWithSampleInterpolation, and compare them with the API specification or behavior. Confirm the intended aggregation shape and interpolation labels; done means the published examples are corrected and internally consistent.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100