0

I am used to Microsoft SQL server, but I have a task requiring use of a clients Influx server

From what I understand of the schema, and what I've been able to explore with the CLI, once you select a database, you can view all the field keys in that database, but there are not field keys that are exclusive to each measurement.

Is this true? If not, I will make a second question regarding how to access the field keys that ARE exclusive to a measurement and I will link it immediately following an answer.

Relevant links are

https://docs.influxdata.com/influxdb/v1.7/concepts/crosswalk/

https://docs.influxdata.com/influxdb/v1.8/query_language/explore-schema/

I have tried using client.query("SHOW FIELD KEYS").get_points() and it returns all field keys in all measurements in the database, since the client is only connected at the database level. But there does not seem to be a "use " options, like exists for "use "

AlbinoRhino
  • 467
  • 6
  • 23

1 Answers1

0

Yes, each measurement has its own columns or field keys.

You can get the columns that are relevant to a single measurement by using columns = client.query("SHOW FIELD KEYS").get_points(measurement = measurement_selection)

where measurement_selection is a string that matches the name of the measurement you wish to observe

AlbinoRhino
  • 467
  • 6
  • 23