205 questions
0
votes
1
answer
68
views
InfluxDB 2.0 Client Stops Writing After Few Hours (Notifications Still Received, Container Restart Fixes Temporarily)
I’m using InfluxDB 2.0 in Docker along with a custom notification receiver (influx-adapter-api container) that writes to InfluxDB using the Python influxdb-client in synchronous mode.
The setup works ...
0
votes
0
answers
33
views
How to upload a time series CSV file to a Influxbd bucket
I have a Influx Bucket where I want to upload a predictions time series dataset for each id_number, the predictions for each goes 2 months in the future.
The thing is that everytime I try to upload it ...
0
votes
2
answers
962
views
Simple example of influxdb-client-python
I am running the script example.py from the influxdb-client-python code base. It runs and writes a data point to a local influxDB instance, for tests and learning purposes only.
From what I understand,...
0
votes
1
answer
749
views
how create a organization and bucket in influxdb with python
how create a organization and bucket in influxdb with python?
i have a python script for creating a org and bucket in influx db but it wont work and return unauthorized response
can any body help me ...
1
vote
0
answers
171
views
Struggling to write data with multiple fields in influxDB
So I'm pretty new to influxDB. I'm trying to create a new measurement (akin to SQL tables according to the doc), with three fields, two tags and the timestamp.
The writing of the data goes fine, but ...
1
vote
0
answers
111
views
Custom timestamp from Influxdb-client Python to InfluxDBv2 not working
I can't seem to send a timestamp to InfluxDB2, using influxdb-client Python.
My code:
(local_time_to_unix is an own defined function to convert to Epoch, this function is correct and I've tested other ...
2
votes
1
answer
875
views
Condition logic `or` in the influxDB filter function
I have a flux query that has several 'or' conditions in a filter function. It's something like this.
from(bucket: "my_buck")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|...
0
votes
1
answer
324
views
Communication between Python and InfluxDB in Docker
I am trying to create an application that let’s me write data to an InfluxDB within Docker. When I execute the code locally and run Influx on Docker everything works fine.
I am now trying to put both ...
0
votes
0
answers
60
views
impot data from pandas dataframe to influxdb, but only get a measurement name, fields get nothing
for index, row in df.iterrows():
point = Point("measurement2") \
.time(index, WritePrecision.NS)\
.tag("tag_key", "1") \
.field("hex"...
1
vote
1
answer
367
views
Python Write to Influx V1.8+
I have implemented a python script to import data to some influx databases.
The data is written as line protocol.
One instance of influx is v2.7, the write of data works, so I guess my line protocol ...
0
votes
1
answer
163
views
Having issue while inserting data in influxdb using python client
measurement = "measurement"
for column in df.columns:
for index, value in enumerate(df[column]):
point = Point(measurement).field(column, value).time(df['unix_time_column'].iloc[...
1
vote
1
answer
1k
views
Why do I keep getting Influxdb unauthorized access (error 401)
I have been trying to follow along the python walkthrough that is provided by influxDB to get familiar with how it works, and just by following the tutorial, I am getting errors, after following each ...
1
vote
0
answers
167
views
Pushing Data To Influx DB From The Command Line Invalid Number Error
I have some iot data in csv format that I would like to push into InfluxDb.
I am using influx write from the command line, but I am getting a parsing error back.
The command I'm running is
influx ...
1
vote
1
answer
2k
views
Undefined identifier in InfluxDB query, invalid binary operator INVALID_OP
I am querying InfluxDB by bucket name and with a range and I got this error: "code":"invalid","message":"error @1:56-1:57: undefined identifier r\\n\\nerror @1:53-1:...
0
votes
1
answer
139
views
Retrieving an empty dictionary when querying data from InfluxDB using DataFrameClient in Python
I have created a database in InfluxD using Python with a code like this:
from influxdb import InfluxDBClient
host = 'xx.xxx.xx.xxx'
port = 8086
username = 'user'
password = 'password'
...
0
votes
1
answer
418
views
How to add variable bucket name in query InfluxDB?
In Line 6 query = 'from(bucket: "my-bucket")\ how do we pass bucket as variable instead of hard-coding it ?
Code Source -> https://www.influxdata.com/blog/getting-started-with-python-...
0
votes
1
answer
1k
views
InfluxDB - Unauthorized Access Issue
I'm new to InfluxDB and encountering an "unauthorized access" issue when trying to connect to my InfluxDB instance using the Python influxdb library. I'm receiving the following error ...
1
vote
1
answer
394
views
Transforming annotated csv (influxdb) to normal csv file using python script
I have a CSV file that was downloaded from InfluxDB UI. I want to extract useful data from the downloaded file. A snippet of the downloaded file is as follows:
#group FALSE FALSE TRUE TRUE ...
0
votes
1
answer
182
views
fields and field values are not pushed into influxdb 2.0 bucket
Here a dataframe for stock XYZ:
timestamp open high low close volume
timestamp
2021-02-04 ...
1
vote
1
answer
1k
views
unable to write in influxdb2 using pandas dataframe
I am trying to write data from a panda's dataframe to influxdb v2.2 using python. However, I am not seeing any data in query.
import pandas as pd
from influxdb_client import InfluxDBClient
from ...
1
vote
1
answer
508
views
odd result when ingesting dataframe into influxdb 2.x
I'm using python to ingest data into influxdb,
but many examples just don't work (empty table, but no error reported), and one example with odd result.
With client set, I create dataframe by:
from ...
0
votes
1
answer
414
views
Python InfluxDB Script
I wanted to have the following script to document my speedtest data, however I get the following error message:
Traceback (most recent call last):
File "/home/pi/speedtest.py", line 35, in
...
0
votes
1
answer
299
views
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 = yf.Ticker('AAPL')....
1
vote
0
answers
260
views
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 ...
0
votes
1
answer
68
views
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 ...
0
votes
1
answer
277
views
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
votes
0
answers
249
views
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:
...
1
vote
1
answer
4k
views
How can I use the Python client library for influxdb to for queries? (InfluxDB OSS v1.8.10)
I learned how to download the client library and write to influxdb databases in influxdb OSS v1.8 at this link:
https://docs.influxdata.com/influxdb/v1.8/tools/api_client_libraries/#install-and-use-...
1
vote
1
answer
315
views
Influxdb 2.2 has 'm' after numbers
I have noticed that some of my values in InfluxDB 2.2 have an 'm' character appended to their value. Is there a way to stop this from happening? I am writing my values as floats to the database. This ...
1
vote
1
answer
460
views
InfluxDB field values mixed from another measurement
I'm sending data into influx-DB 1.8 OSS, which has 2 measurements. In that one measurement got mixed field values from another measurement.
Eg:
measurement 1
field: Apple, Banana, Grapes, Orange
...
1
vote
2
answers
7k
views
What is the query to select multiple columns and group by one of the column in InfluxDb using Flux?
How to write similar query using Flux:
SELECT field_a,field_b from 'measurement' where field_a = 10 and group by field_b
0
votes
1
answer
1k
views
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)
5
votes
1
answer
3k
views
flux query very slow in compare to InfluxQL (10x slower)
I'm upgrading form influx1.x to influx2.x (updating queries from influxQL to Flux syntax).
For very simple queries, performance drops dramatically when I try to query more than 500,000 points and I'm ...
0
votes
1
answer
42
views
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 ...
1
vote
0
answers
382
views
Connecting and accessing data from influxdb(self hosted server) to jupyter notebook
I have been trying to access influxdb self hosted data through jupyter notebook.
ref link: https://www.influxdata.com/blog/streaming-time-series-with-jupyter-and-influxdb/
.
from influxdb import ...
0
votes
1
answer
719
views
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 ...
0
votes
1
answer
824
views
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 ...
2
votes
0
answers
160
views
influxdb histogram flux query with filter
I'm using influxdb 2 to store a time series db of water stations. The points are something like:
from influxdb_client import Point
Point("station").tag("id", station_id).field(&...
2
votes
2
answers
132
views
How to type hint object as `PointType` in Python aioinflux?
I have a dataclass similar to the one defined in the docs :
from dataclasses import dataclass
@lineprotocol
@dataclass
class Trade:
timestamp: TIMEINT
instrument: TAGENUM
source: TAG
...
0
votes
1
answer
394
views
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=...
0
votes
1
answer
1k
views
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 = &...
0
votes
1
answer
827
views
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 ...
1
vote
0
answers
316
views
What is the fastes batch_size for influxDBClient
I want to write a list of 1,000,000 datapoints to my influxDB.
I use this command:
client.write_points(listOfPoints[:1000000], batch_size=1000000)
This returns Entity Error: InfluxDBClientError: 413: ...
2
votes
0
answers
453
views
How to read influxdb backup data with Python (with pandas or other tool)
I have a data backup folder produced from an influxdb with the backup and restore utility. This produces a .tar.gz file as mentioned in the reference.
I wish to open and process these data with Python ...
0
votes
1
answer
727
views
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}" )
...
0
votes
1
answer
885
views
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') \
...
2
votes
1
answer
17k
views
InfluxDB Unauthorized 401 - with localhost access
When try to write the data into influxDB using influxDB client. i am getting the below error. I was able to login to the influxDB web browser using http://localhost:8086 with the same credentials ...
0
votes
1
answer
849
views
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 ...
1
vote
1
answer
480
views
detect error on asynchronous write to influxdb using python influxdb_client
This is my code:
write_api = client.write_api(write_options=ASYNCHRONOUS)
write_api.write(bucket, org, data, write_precision=WritePrecision.US)
1 - How can I detect writing errors?
2 - Should I ...
0
votes
1
answer
1k
views
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....