I have the following columns:

'datetime', - which gives the time when the sensor values are recorded.

'machineID', - which gives the machine ID of the machine from where the sensor values are recorded.

'volt', 'rotate', 'pressure', 'vibration' - 4 different sensor values measured for a particular Machine at a time.

Please let me know if I need to name datetime and MachineID coulumns under tag or fields.

Thank you in advance.

1 Answer 1


You can take a call considering below two scenarios.

  1. If you need to run a GROUPBY clause on a particular column/field, then you need to create it as Tag, otherwise you won't be able to use GROUPBY clause.

  2. Indexing: Fields cannot be indexed in influxdb. Tag are automatically indexed.

Also, influx by default creates a 'time' tag, so it's better while inserting you pass the value to 'time' instead of adding an extra column called 'datetime'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.