Use this tag for questions about the InfluxDB-Python client library.
Questions tagged [influxdb-python]
215 questions
0
votes
1 answer
How do I get structured data when querying data from influxdb in python?
I've been entering data as fields to the influxdb. when i'm querying data, I"m not getting them as a table like I would when I query in SQL. Is there any way i can get a list of dictionaries like i did when i inserted data to the db.
for…
0
votes
1 answer
Influxdb2 Python API: Path not found
I have a working InfluxDb2 server and, on a Raspberry Pi, the Python client library.
I've generated the the tokens in the server UI and copied an all-areas one into the Python. The test bucket is set up in the UI too. In the Python program I have…

Hugh Barnard
- 352
- 2
- 12
0
votes
1 answer
Recording high frequency time-series data with influxdb
I want to record data every 10 milliseconds. Here is the sample code:
with InfluxDBClient(url=url, token=token, org=org, enable_gzip=True) as client:
with client.write_api(
write_options=WriteOptions(
batch_size=100,…

torayeff
- 9,296
- 19
- 69
- 103
0
votes
1 answer
Python: Querying data from Influx database using pandas
I am trying to query data from the Influx database through pandas using the following code:
from influxdb_client import InfluxDBClient
import pandas as pd
my_token = "my_token"
my_org = "my_org"
bucket = "bucket"
query= '''
from(bucket: "bucket")
…

MathMan 99
- 665
- 1
- 7
- 19
0
votes
1 answer
InfluxDB JSON data ingestion into a measurement
I am trying to ingest the data from one measurement (vulnerability) to another measurement (test1) using influxDB python client. Since i want to ingest only server, ID, route from vulnerability measurement into test1 measurement, i choose three…

peter
- 17
- 5
0
votes
1 answer
Influxdb client query returns empty list even though there is a data
query_api = self.client.query_api()
query = f"""from(bucket: "{self.bucket_name}")
|> range(start: -60d)
|> filter(fn: (r) => r._tag == "{tag}" )
|> yield(name: "name")"""
result = query_api.query(org = self.organization_name, query =…

kyo
- 164
- 14
0
votes
1 answer
Influxdb time range query
I am trying to form a sql query for the below condition in where clause but it is giving an error.
date(\"time\") BETWEEN date_trunc('month', current_date - INTERVAL '1 months') \
AND (date_trunc('MONTH', current_date - INTERVAL '1…

svw1105
- 127
- 1
- 15
0
votes
1 answer
Do all measurements (tables) in an influx database share field keys (columns)
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…

AlbinoRhino
- 467
- 6
- 23
0
votes
1 answer
InfluxDB PythonAPI broken or am I?
Does StackOverflow really autodeletes Hey guys from beginning of text? :D Hello, i have a problem i cant seem to wrap my mind around.
from influxdb_client import InfluxDBClient
from influxdb_client.client.write_api import SYNCHRONOUS
# You can…

Jan Janáček
- 109
- 1
- 9
0
votes
3 answers
How connect to locallhost influxdb from python and without token?
I am trying just simple connect to influxdb which started on localhost.
When I try just client:
influx --host 192.168.0.2 --port 8086
It works.
But when I try python:
import os
import json
from influxdb_client import InfluxDBClient, Point,…

Cherry
- 31,309
- 66
- 224
- 364
0
votes
1 answer
InfluxDB: How can I find the timestamp of the next sample?
I have a rather large time series (500 M samples) with irregular timestamps.
In particular, I have times where samples are very tightly spaced (ms) and then very large gaps (no samples for days).
I often pull the entire series from Influx to process…

blondiepassesby
- 181
- 1
- 7
0
votes
4 answers
Python InfluxDB2 - write_api.write(...) How to check for success?
I need to write historic data into InfluxDB (I'm using Python, which is not a must in this case, so I maybe willing to accept non-Python solutions). I set up the write API like this
write_api = client.write_api(write_options=ASYNCHRONOUS)
The Data…

Chris
- 834
- 1
- 10
- 23
0
votes
0 answers
How to solve this error TypeError: write_points() missing 1 required positional argument: 'measurement'
I am trying to add csv data in influxdb but this code is giving error, I am not sure what this error means
client= DataFrameClient(host='localhost',port=)
client.write_points(json_body)
TypeError: write_points() missing 1 required positional…

waqar ali
- 79
- 6
0
votes
1 answer
InfluxDB 2 introductory sample does not insert any data into the bucket, no error , no exception
I am new to influxdb and have also the issue that I can't insert data as it is reported in this post InfluxDB 2 introductory sample does not insert any data into the bucket
I am using the python example which is exactly the same as the C# example…

Martin S
- 377
- 3
- 14
0
votes
1 answer
InfluxDB: Write requests successful (HTTP 204) but do not show up
Since today Sep 1, 2021, 0:00 UTC some of the write requests I send to an InfluxDB (1.8) are not stored anymore while others are working fine.
I write data from different applications to different databases:
tool
database
stored in…

LordOfTheSnow
- 91
- 1
- 9