Questions tagged [influxdb-python]

Use this tag for questions about the InfluxDB-Python client library.

215 questions
3
votes
0 answers

How Can I change the Retention Policy for all data with a specific tag?

I'm writing a short Python script to allow a user to change the length of the retention on a tag. The user enters the measurement they wish to look at, and then after being prompted with the possible 'Identifiers', they enter the one they want to…
james12
  • 27
  • 3
3
votes
1 answer

How to properly write order book data into influxdb with same timestamp

I'm trying to store order book data into an influx db. This is what the data looks like: Datetime BidPrice BidSize AskPrice AskSize Level 2018-08-15 09:21:15 6347.67 14.561605 6347.68 3.189313 0 2018-08-15 09:21:15 6347.52…
bloodynri
  • 543
  • 1
  • 6
  • 14
3
votes
0 answers

InfluxDB: Response time changes for the same query

InfluxDB is showing a peculiar behavior in which same query is taking variable amount of time to execute. I have a simple "select" query over a measurement with 79 million records. Usually the query takes 180 seconds to complete but if I execute…
3
votes
2 answers

Working with Change Data Capture in InfluxDB-Python?

I am a ML programmer, and I am building a High-Frequency trading model. Once I am in production, I need to capture data directly from the market. I am using an influxdb database, i.e. a time series database (TSDB), but I don't know how to capture…
Jeremie
  • 405
  • 1
  • 7
  • 20
3
votes
3 answers

Unable to write values from list to csv python

I'm trying to write some data from my InfluxDB database to a csv. While the influxdb-cli does allow me to export data to csv, I am not allowed to run the cli on the server myself. I'm using the influx-db python package to query the database. Now,…
3
votes
1 answer

Write pandas DF with tags to influxdb

I have this [3526 rows x 5 columns] DF, where col0 is time, col1-col3 are tags and col4 is my value. 0 1 2 3 4 0 2017-09-29 22:41:51 10.2.95.5 C1195_LF470_SARF 0.0.1.1 …
Lucas Aimaretto
  • 1,399
  • 1
  • 22
  • 34
3
votes
0 answers

MySQL and InfluxDB timeouts

I am running a web.py server on my machine that continuously receives POST-data and stores some of the data in MySQL(5.7.19), and some in InfluxDB(1.3.1), both hosted on a remote server running Ubuntu(16.04.1). I also have a Python script running…
oloens
  • 31
  • 1
3
votes
2 answers

Write Python Dict to InfluxDB?

I've been playing around trying to figure out how to write a python dict into InfluxDB with no luck. I've tried using the InfluxDBClient as well as just using a Requests Post via API. I have the following code: for server in …
ddevalco
  • 1,209
  • 10
  • 20
2
votes
0 answers

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("pressure", 0).time(datetime.now()) Point("station").tag("id",…
zipmann3
  • 29
  • 1
2
votes
1 answer

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 provided in the code. But facing with the…
learning fun
  • 97
  • 1
  • 1
  • 5
2
votes
3 answers

Using params in flux queries with Python influxdb_client

I am trying to update all of our influxdb python queries, so that they are not vulnerable to sql injections. To do this, I have read that you can use params with the query_api() and specifically with the query_data_frame()…
2
votes
1 answer

InfluxDB: Export/Import large number of points form one instance to another

I have an instance of InfluxDB installed in one of our customers premise, that I don't have access to. When certain problems are reported, I need to identify a window of time (before and after the problem) and provide them a script that can pull…
Bhakta Raghavan
  • 664
  • 6
  • 16
2
votes
2 answers

Writing values with multiple tags into influxDB (with python)

I’m writing values (floats) to an Influx database with (using DataFrameClient), along with two tags: an ID and a timestamp def write_to_influx(ID, value): df = pandas.DataFrame(data=[value],index=pandas.date_range(start=datetime.utcnow(),…
cheesus
  • 1,111
  • 1
  • 16
  • 44
2
votes
3 answers

`missing tag key` when inserting to InfluxDB with inserting with multiple tags

I created a new db mydb on Influxdb. Next I did use mydb When I run insert on my db, I run into error - ERR: {"error":"unable to parse 'angle, userid=1, product=pname value=5.1': missing tag key"} Here's the insert that I am running - INSERT…
nkirit
  • 379
  • 2
  • 4
  • 13
2
votes
0 answers

Aggregate function sum() and count(Distinct()) takes more than minute to return result in influxsql

I am executing one influxSQL query which is returning result in more than 1 minutes. Query : select SUM(call_duration) as total_duration,Count(Distinct(recipient_id)) as total_recipients from xyz where target_id = '1'; Separate queries like…
jkamani
  • 51
  • 3
1
2
3
14 15