This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
Adding multiple fields by using dict type doesn't work #898
Open
Description
- InfluxDB version: latest
- InfluxDB-python version: 5.3.1
- Python version: 3.9
- Operating system version:
- Client - Windows
- Server - Linux (Docker)
I'm not able to spot my mistake adding data to my InfluxDB by using the following scheme:
from influxdb_client import InfluxDBClient
import datetime
from influxdb_client.client.write_api import ASYNCHRONOUS
client_db = InfluxDBClient(url=f"http://{ip}:{port_db}", token=token, org=org)
write_api = client_db.write_api(write_options=ASYNCHRONOUS)
data = {
"measurement": "title",
"time": datetime.datetime.now().strftime("%m/%d/%y %H:%M:%S.%f"),
"fields": db_dict
}
write_api.write(bucket=bucket, org=org, record=data)
where db_dict is a dictionary with multiple key:value entries. I don't receive any error but my DB remains without entries. It worked out fine before following this pattern - not this time. The titles of measurement and field of my inserted data are also displayed. I even tried varying with a time offset but didn't solve the problem. Any ideas whats the issue here? Thankful for every hint.
Metadata
Metadata
Assignees
Labels
No labels