So currently I have 1 script inserting sensor data into my weather database every hour using python.
I have now added a second script to add rainfall data into the same table also every hour.
Now the problem: When the 2nd script inserts, all other values get 'zeroed'. As displayed in grafana.
am I overwriting somewhere or, if someone could point me in the right direction
Weather sensors insert statement
sql=("INSERT INTO WEATHER_MEASUREMENT (AMBIENT_TEMPERATURE, AIR_PRESSURE, HUMIDITY) VALUES ({},{},{})".format(temperature,pressure,humidity))
mycursor.execute(sql)
weatherdb.commit()
Rainfall sensors insert
sql=("INSERT INTO WEATHER_MEASUREMENT (RAINFALL) VALUES ({})".format(rainfall))
mycursor.execute(sql)
weatherdb.commit()