InfluxDB understanding basics and IoT Schema design

Hello, my first post here.

I recently started working with InfluxDB and the thing I inherited might not be optimal. In my opinion the Influx is not used as it should but since I am new to Influx I need help in understanding some things and the way it would be correct to set it up.

We are doing some IoT data, sensors measuring different things. Currently each sensor creates new measurement with ID of sensor and location of sensor (ex. sensor1:store1). There are no tags, everything is a field.
As I understood it, the measurement should be some name that makes sense to me, such as a building name for example, and then all the data should be in format tag-sets and fields. The tag-set should be for example room and its id, sensor and its id, sensor type and type and then temperature should be a field, or any other thing that sensor is measuring should be a field? Also, what if sensor measures multiple things, like temperature and humidity, should it be “tag-sets temperature=value humidity=value” or split into “tag-sets temperature=value” and “tag-sets humidity=value”? There will be multiple sensors so not all of them will have same fields and not all of them will be measuring same things.

I am not sure how to split and organize the data because there could potentially be millions of data points at some point.
If I have number of sensors, lets say 10000, is that still ok to be a tag?

If I am wrong about anything please correct me. Also, if there is some great explanation somewhere on larger data set example let me know because I am struggling to find something more than just the basic setup with always having same fields and low amount of data points.

Hi. You are very smart to ask these questions. I found this webinar from Influxdb about Schema Design for IoT to be extremely helpful. Watch it all the way through, then think about your own data. Write down your field names & tag names, then go back and watch the video again to make sure it still makes sense.

Thank you very much. This is something that helps. However, it would be so nice if it was not 5 y old, I feel like with newer version they might have changed some limitations that are mentioned throughout the video. The example part is the most helpful part :slight_smile:

There are still some questions that I have but I think I got direction to go with. I guess I will try to go with a schema and sane test it on forum here and run some tests with dummy data.

I agree that a 5-year old video is not great, but I found the clarity of explanations for tags and fields was much better than most. Your IoT sensor description sounds very much like our application (e.g. temp and humidity). For example, we might have:

image