How to re-shape Data getting from Gen2 Device to make request tsiclient server getTsqResults using TSI javascript SDK.

Karthik Shetty 6 Reputation points
2021-09-01T16:18:22.99+00:00

Hi, @QuantumCache

I have a web application where I try to visualize the data I have in my Time Series Insights environment in a basic chart with the Azure Time Series Insights Javascript SDK same as above i got an input aggregate error.

I am using Gen2 Device I need to shape JSON Array for sending data.
Is there any document for shaping JSON which will support for input for tsqArray.
In Document link was Broken links
https://learn.microsoft.com/en-us/azure/time-series-insights/how-to-shape-json.

tsiClient.server.getTsqResults(response.accessToken, '10000000000000000'.env.timeseries.azure.com', tsqArray.map(function(ae){return ae.toTsq()})).then(function(result){
console.log(result)
// result I am getting 400 response.

[{"tsiError":{"error":{"code":"InvalidInput","message":"Values in a single time series ID '[\"14fcd53a-d3d1-f208-088c3c7d\"]' must match the time series ID properties '[site:String,iothub-connection-device-id:String,data.id:String]' defined for the environment.","innerError":{"code":"TimeSeriesIdValueMismatch"}}}}]

Azure Time Series Insights
Azure Time Series Insights
An Azure internet of things (IoT) analytics platform to monitor, analyze, and visualize industrial IoT analytics data at scale.
78 questions
0 comments No comments
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.