Fields and tags

HI i have a data of positions of a vehicle , i want to make 2 tags like (longitude and latitude), and values like (co2, power …etc) as fields ,
my final result is i want to group by longitude and latitude , then count the how many times this pair is repeated .

because of group by i am making longitude and latitude as tags, for fields we can’t apply the group by
question is
is it ok to make 2 distinct values (longitude and latitude) as a tags . if the position values may increase and we may get same longitude and latitude values multiple time
from the document what i found is if the same tags is repeated then it will override

please can any one help
and let me know how to insert the bulk operation using the python influxdb library

Depending on the precision used for lat/lon, you may easily end up with very high cardinality, which is not good.

You can check built-in (experimental) Flux geo package.
Good overview with background info on how it works is here (from ~13:00). Please note that it’s a few months old videocast and there may have been changes since in the package).

1 Like