Data with dimentions from AWS Timeseries

I’ve been struggling for some time with something I’d thought would be simple and perhaps I’m missing something obvious. I’m pumping data from multiple sensors data into AWS Timestream and I wanna make Grafana make a graph with these timeseries. The number of sensors vary over time so I’d like Grafana to understand that the data in the different dimensions are different time series.

The data looks like this when I make a naive attempt.

The table representation looks like this:

Can I get Grafana to understand that this is not just a single timeseries but rather five different? It seems I can’t change how the name of each timeseries is presented to Grafana. I’ve tried naming the input data that flows into Timestream but it all ends up as measure_value::double no matter what name I give it.

Thanks for what so far has been an amazing product, btw. The mind boggles as the complexity you guys have managed.



not clear what you want, do i understand correct you have a unknown number of data channels?

you are welcome


Did you try a group by sensor on the query?

Good Luck

Yes, @melrose, I have several data channels in the same table. Each measurement is logically tied to a timeseries (dimension) by the content of the sensor column.

Initially I thought this could be fixed by a simple GROUP BY, but from my experimenting it seems that this will still spit out one timeseries as the GROUP BY happens before Grafana looks at the incoming data and trying to make sense of it.

Is what I’m trying to impossible, that would be livable. I’d have to instruct ppl to do some more manual labor. I’m just curious if I’m missing something obvious.

Just you giving me the term “data channels” is helpful as I try to navigate the docs.

I think I’ve managed to crack it. Once I understood that the query goes unmodified into AWS Timestream I understood that I had a look at the AWS docs to figure this out.

In the Timestream docs I found “CREATE_TIME_SERIES” function and I wrote the following query that seems to do what I want to:

SELECT sensor,CREATE_TIME_SERIES(time, measure_value::double) as ts
FROM "yrpoller-dev"."air_temperature" 
WHERE time between ago(15m) and now() 
GROUP BY sensor, time

use group by

  • List item