Use this tag for questions about the InfluxDB-Python client library.
Questions tagged [influxdb-python]
215 questions
0
votes
0 answers
How to select all fields greater than specific value in Influxdb
I have a database in Influxdb 1.7 with several columns and no tag key.
I want to receive only fields where the value is greater than 0 (zero)
(I'm using grafana to show)
like:
table1:
| time | A | B | C | D | E | F |....| AD | AE |…
0
votes
1 answer
write date from yfinance Timestamp to influxdb and query the date - timezone support
I am trying to write date/time data to influxdb and query the data to a dataframe.
when I write the data date time looks like this...
ticker= 'AAPL'
import yfinance as yf
df =…

grayred8
- 93
- 6
0
votes
0 answers
How can I solve this python issue to write in influxdb?
I am trying to write data with the python code you can see in the GUI (IP:8086) for InfluxDB. My influxdb is version 2.5. I have the right influxdb-client for this version. I have tried creating new token, but the result is the same. I have followed…

wertyu
- 1
- 3
0
votes
0 answers
Setting the RAM limit for the influxdb write process
The python influx client use too much ram during the writing process. Since we do not have access to the influxdb config we need to improve this in python directly. I tried to optimize it using different settings for batch_size, flush_interval,…

Ali Ajouz
- 61
- 3
0
votes
0 answers
InfluxDb Python not publishing to correct fields
I have some code that iterates through a dataframe and creates data points and writes like so:
for index, row in final_df.iterrows():
dataType = row["dataType"]
name = row["topic_name"]
value = row["value"]
data = Point("topic") \
…

razer
- 21
- 4
0
votes
0 answers
Influxdb-client Python API
I have a quite concerning problem with this API. I am using this API to perform six different queries one after the other. However the between the queries I save the resulting pandas dataframes into csv files.
After this phase, I proceed to read the…

Luca_27
- 1
- 3
0
votes
0 answers
Telegraf dropping tag having special characters from a specific measurement
My application is using python stastd client to send data to a telegraf service which in turn writes data at specific interval of 10seconds. I am observing tags having special characters are getting dropped from measurements. I followed the influxd…

Deepanshu Arora
- 375
- 1
- 5
- 21
0
votes
1 answer
Does that make sense to make a list of dataframes and analyze the list elements pair wise?
I am querying several signals from InfluxDB to the Pandas dataframe every 5 minutes. If these signals meet a specific condition, I add the dataframes to the list. Then I want to take dataframes pair wise and perform a calculation on them.
df_list =…

Nili
- 91
- 8
0
votes
0 answers
Unable to write JSON data into InfluxDB 2.x using python client
I'm trying to insert a simple json data into the InfluxDB 2.x using python client: influxdb_client.
The code create the measurement and all the fields and tags but it does not insert the data.
This is how I'm connecting to InfluxDB:
from datetime…

Hussam Cheema
- 41
- 7
0
votes
0 answers
Write json dictionary within json dictionary to influxdb
I have some data (orderbook data for a crypto token) it looks like this:
'exchange': 'BYBIT'
'symbol': 'BTC-USDT-PERP'
'book': {'bid': [Decimal], 'ask': [Decimal]}
'timestamp': 1664773747.197
The bid and ask in the book are a long list of decimal…

ripbozo
- 45
- 4
0
votes
1 answer
InfluxDBClient object has no attribute api_client
I'm running on error here.. I'm a beginner but I cant figure out what I am missing! The query runs fine on Data Explorer's script editor.
influxdb 2.4
Python 3.10.6
Ubuntu 22.04.1
influxdb_client 1.32.0 (pip install 'influxdb-client[extra]')
I…

grayred8
- 93
- 6
0
votes
0 answers
Separate date and value from influxdb
hello I would like to know if it is possible to select only the values of my influx table, when I make a query in python it also extracts the date. or I would like to know how I can separate them within python to later create a dataframe.
this is…
0
votes
0 answers
InfluxDB Python Timing each write
So I have created a script to upload a list of 1 million points in batches of 4000 points every second so it should take 250 batches to upload the data.
I have placed 2 timing functions in the script:
One around each write_api.write() to calculate…

RealPythonUser
- 1
- 1
0
votes
1 answer
How to calculate sum of a column and group by quarter of months (time) in InfluxDB using Flux?
from(bucket: "bucket")
|> range(start: 2022-01-01T00:00:00Z, stop: 2022-12-31T00:00:00Z)

Nikhil
- 21
- 1
- 2
0
votes
1 answer
Python aioinflux `serialization.usertype.SchemaError: Can't have more than one timestamp-type attribute`, how to avoid it?
I have this dataclass with a lineprotocol schema like this:
from datetime import date, datetime
from aioinflux import lineprotocol, TIMEDT, TAG, FLOAT, MEASUREMENT, STR, INT
from dataclasses import dataclass
from shared import…

KZiovas
- 3,491
- 3
- 26
- 47