diff --git a/influx_frontend.py b/influx_frontend.py index a4d6bf7..be9f243 100644 --- a/influx_frontend.py +++ b/influx_frontend.py @@ -88,8 +88,8 @@ def add_time(): print(dt) print() write_api = client.write_api(write_options=SYNCHRONOUS) - p = influxdb_client.Point("2016_odyssey").time(timestamp).field("odometer", float(odometer)).field("oilhealth", oilhealth)\ - .field("fuel", fuel).field("fuelcost", fuelcost).field("winter", winter) + p = influxdb_client.Point("2016_odyssey").time(timestamp).field("odometer", float(odometer)).tag("oilhealth", oilhealth)\ + .tag("fuel", fuel).field("fuelcost", fuelcost).tag("winter", winter) write_api.write(bucket="gas", org=config['DB_ORG'], record=p) print ("Submitting data to DB: {0}".format(json_body)) #client.write_points(json_body)