Can I get relation between country state and cities in a measurements and also relation between two columns in a table

Hi, I am new learner of InfluxDB and want to understand some points:

  1. how I can relate country, state and cities in a table.
  2. Is joining of two table works in influxdb if yes then please help how to do here.
  3. suppose there are mulitple devices located in different cities and from one city to other city devices are connected how to write structure of table and query for this.

Hello @saurav_srivastav,

  1. Can you help me understand what you’re trying to do exactly? Can you please explain what you mean by relate country, state and cities in a table?
  2. Yes. You can perform joins() to perform math across measurements. However, keep in mind that joins are only necessary if your cities and state tags are in different measurements.
  3. I would probably keep locations of devices in a tag. I would probably have:
  • a “my-project” bucket or database
  • a “devices” measurement
  • a “location” tags with “city, state” OR two location tags “city” and “state”

Hi @Anaisdg,
I am new in influx DB and I have to create structure as of now for 8 devices
each devices will have their neighbour devices and will be located in different cities of a country.
Also each devices will have there link capacity that will 10gig/sec and when device will communicate with other device during that time there current link capacity will be random float value but will be under 10gig/sec
and some threshold value like 80% of each device if any device’s current link capaxcity crosses the threshold value or it reaches to near by threshold need to generate alert,
and need to generate graph continiously for each device where every 5min record will entre into database.
This is my requirement. In this requirement I have written python scriot that will enter data in DB and have cron job that will execute python script every 5min. I want to know how I will handle in database to generate graph for further analysis based on time like if I have to check activity of device of last week or last 2 days i need to generate that.

Hello @saurav_srivastav,
You can use the InfluxDB UI to create dashboards. These dashboards you create. can be populated to view/visualize data however you want. You can use influxql (v1) or flux(v1.7+) to perform data exploration, analysis, and transformation. You can also create alerts (v1) and tasks (v2).
What devices are you using?

This is POC for my company. Cant disclose publicly