I receive data from multiple sensors which are distributed in different places.
As i’m not yet aware of how to use the Indluxdb2 dashboard, i store the data also on the old Influxdb 1.8v, and it looks like the following:
my question is:
How can i show the same data (the same way) on the influxdb2 dashboard without having to use the aggregation functions(as they cause errors with the names in red(strings)?
I would like to be able to download a CSV file with “Correctly tabled” data (not mixed measurements - like all the temperatures, measurements from all the places are stated together).
Hello Scott, thank you for your reply, the influxQL query was:
**
use DataBase_1
select * from measur_1 limit 50
**
When i try to show the same data on the Influxdb2 dashboard, i get all the sensors data from all the sites mixed together, hence the graph doesn’t represent the real data of any of the sites.
Ok, thanks for the screenshot. It definitely helps identify the problem. Are you meaning to store device_id and ____ Name as fields? I would expect these to be tags to get the data to graph they way you’re hoping.
honestly, i don’t know how to define their type as i send them from Node-Red as variables, but if converting them into tags would solve the problem then what should i do to make them tags?
There is information on writing values as tags in the InfluxDB Node documentation. Setting “metadata” like device ID and name as a tag will make your data easier to query.
Thank you Scott, i started to search the documentation but i was confused about which section should i search (the word “tags” don’t have much) i’ll check what you suggested instead.
In the InfluxDB node (Node Red) documentation, you separate fields and tags in to separate objects as part of the output node payload array. The first object in the array is all the fields. The second object is all the tags associated with the point. Here’s the example they provide:
but as i don’t see any graph at the moment, i’m not sure if is it because the new data is too few or i should change something, i’ll wait 24h and try to get the mean curve.
1 last question, is it possible to modify the old data(not tagged) or I’ve to ignore it and start again?
Is it possible to modify the old data(not tagged) or I’ve to ignore it and start again?
With the way the data was structured, unless every sensor sent data in at different times, there isn’t a way to accurately associate the field and tag values that should be tied together. I’m afraid you may just have to start again.
How i can rearrange the data based on the received time of influx?
By default, InfluxDB returns data sorted by time. You shouldn’t need to re-sort the data. When you use the sort() function from the functions selector, it doesn’t actually let you set the column(s) to sort by and the default is ["_value"]. This is why it appears to be sorted by value.
To help see that data as it is, don’t apply any aggregate function. If one is selected, deselect it. This will return your data as is without any aggregation or modification.
With the way the data was structured unless every sensor sent data in at different times, there isn’t a way to accurately associate the field and tag values that should be tied together. I’m afraid you may just have to start again.
I think i’ll start again, I’m keeping an additional version of the same data on the Influxdb 1.8, so maybe i can manipulate it and immigrate it to V2.
To help see that data as it is, don’t apply any aggregate function. If one is selected, deselect it. This will return your data as is without any aggregation or modification.
But the platform doesn’t allow me to do that, every time i try to deselect the aggregation function, it complains like:
also for the “AUTO” for the aggregation functions, i can’t deselect them. I must choose one.
I’m running the InfluxDB v2.4.0 as a container inside the RPI, and the behavior for me is as i mentioned, in fact, this is the main reason why i was looking to change the data that contain strings as the aggregation functions(which must be applied in my case) throw an error for the strings data.
This is what happens when i try to deselect the mean box:
Well that’s frustrating. With your current selection, just click Script Editor to switch over to the raw Flux query and delete the line with aggregateWindow(). That will return the data as it is.