Hi, I’m new to influxdb.
Trying this tutorial I run into an eternally running query after the last line:
## import dependencies
import tensorflow as tf
import numpy as np
import pandas as pd
## Loading the data as a pandas dataframe
data = pd.read_csv("sunspots.csv", index_col=0)
## show first dew rows of the dataset
data.head()
## import dependencies
from influxdb_client import InfluxDBClient, Point, WritePrecision
from influxdb_client.client.write_api import SYNCHRONOUS
## You can generate a Token from the "Tokens Tab" in the UI
token = "my-token"
org = "my-org"
bucket = "my-bucket"
## connect to influxdb
client = InfluxDBClient(url = "http://localhost:8086", token = token, org = org)
# convert Date column to datetime
data['Date'] = pd.to_datetime(data['Date'])
## create date as index
data.set_index(data['Date'], drop = True, inplace = True)
data.drop('Date', axis = 1, inplace = True)
data.head()
## create object of write API
write_api = client.write_api(write_options = SYNCHRONOUS)
## write data to influxdb
response = write_api.write(bucket, record = data, data_frame_measurement_name = 'sunspot',
data_frame_tag_columns = ['sunspot'])
## query data
query_api = client.query_api()
tables = query_api.query('from(bucket:"my-bucket") |> range(start: -275y)')
My CPU and memory usage is very high, but it never ends.