Hello everybody
I’m very new to influxdb.
Perhaps it is a stupid question, but I want to have multiple measurements for different values. For example one measurement for energy, one for voltage, …
How can I create them?
I’m using the Python Client with the JSON_Body and I’m not able to create them.
Please help me!!!
Thanks a lot, Sebastian
Hello @raubuchs,
Welcome! It’s usually recommended that users create fewer measurements with multiple fields. You might consider energy and voltage to be two fields in one measurement.
Please take a look at these data layout recommendations.
What seems to be the problem with the client?
In the meantime, please check out this tutorial on how to use the python client.
Hello
Thanks for the reply
Only to complete my question, this is my list of Fields (it’s the complete JSON-Body), that I’m using at the moment
value_db_energy = [
{
“measurement”: “energy”,
“tags”: {
“device”: 0,
“input”: 0
},
“time”: iso,
“fields”: {
“unit”: [""],
“value_Ea_plus”: 0.0,
“value_Ea_minus”: 0.0,
“value_PEa_plus”: 0.0,
“value_PEa_minus”: 0.0,
“value_Er_plus”: 0.0,
“value_Er_minus”: 0.0,
“value_V_L1_N”: 0.0,
“value_V_L2_N”: 0.0,
“value_V_L3_N”: 0.0,
“value_V_L1_L2”: 0.0,
“value_V_L2_L3”: 0.0,
“value_V_L3_L1”: 0.0,
“value_F”: 0.0,
“value_I_L1”: 0.0,
“value_I_L2”: 0.0,
“value_I_L3”: 0.0,
“value_I_N”: 0.0,
“value_P_Sum”: 0.0,
“value_Q_Sum”: 0.0,
“value_S_Sum”: 0.0,
“value_PF_Sum_IEC”: 0.0,
“value_PF_Sum_IEEE”: 0.0,
“value_P_L1”: 0.0,
“value_P_L2”: 0.0,
“value_P_L3”: 0.0,
“value_Q_L1”: 0.0,
“value_Q_L2”: 0.0,
“value_Q_L3”: 0.0,
“value_S_L1”: 0.0,
“value_S_L2”: 0.0,
“value_S_L3”: 0.0
}
}
]
I’m also using Grafana and there I want to have the possibility to choose the measurement
As you can see in the picture, I want to choose here which “class” I want to query. Therefore I need multiple measurements.
BR Sebastian