Nicolas Hourcard
11/10/2022, 10:30 PMHà Hữu
11/11/2022, 7:22 AMHà Hữu
11/11/2022, 7:30 AMJack
11/11/2022, 6:13 PMNicolas Hourcard
11/13/2022, 10:40 AMPei
11/14/2022, 11:01 AMPei
11/14/2022, 3:55 PMNicolas Hourcard
11/14/2022, 4:19 PMMartin Brutsche
11/14/2022, 10:34 PMPei
11/15/2022, 1:06 AMHà Hữu
11/16/2022, 5:59 PMNicolas Hourcard
11/16/2022, 6:24 PMMuhammad Amal
11/17/2022, 1:51 AMWeibo Lei
11/17/2022, 4:50 AMtheseusyang
11/17/2022, 8:37 AMJonas Degelo
11/17/2022, 2:17 PMCREATE TABLE ts(time_stamp TIMESTAMP) timestamp(time_stamp) PARTITION BY DAY;
I am using the questdb python library to insert data using the Influx DB line protocol. I have the following python code:
from datetime import datetime
from questdb.ingress import Buffer, Sender
user='admin'
password='quest'
host='localhost'
port=9009
database='qdb'
buf = Buffer()
ts_one = datetime.fromtimestamp(180)
ts_two = datetime.fromtimestamp(360)
print(ts_one)
print(ts_two)
buf.row('ts', symbols=None, columns= {'time_stamp': ts_one}, at=ts_two)
buf.row('ts_', symbols=None, columns= {'time_stamp': ts_one}, at=ts_two)
print(buf)
with Sender(host, port) as sender:
sender.flush(buf)
the table ts_
wasn't previously created. Now I'd expect to either have a timestamp at 3 or 6 minutes inside my ts
table, but I end up with one at .18 seconds (1970-01-01T00:00:00.180000Z
).
In ts_
on the other hand I get the expected value of 3 minutes in the time_stamp
column and 6 minutes in a autogenerated column called timestamp
.
I get the correct value into ts.time_stamp
if I multiply the integer used for creating the datetime by a factor 1000, but this feels hacky
I have tried adding a row to the buffer with columns=None
or columns={}
with just at=ts_one
but this didn't actually add a row to the buffer, I suppose because the row is in fact empty. If I omit the at
parameter a new column will be created for the at value, and that's not what I want either.
QuestDB version: 6.5.5
I've added screenshots for the values in the ts
and ts_
tables
Any help is greatly appreciated, thank youNicolas Hourcard
11/17/2022, 2:19 PMHà Hữu
11/18/2022, 7:43 AMAndreas Sakellariou
11/18/2022, 10:07 AMAndreas Sakellariou
11/18/2022, 10:09 AMNicolas Hourcard
11/18/2022, 10:13 AMPei
11/18/2022, 1:20 PMJack
11/18/2022, 4:07 PMselect * from table where ts in '2022-06-22T23;1m;86400s;150'
Joshua Xia
11/20/2022, 7:47 AMGeorge UA
11/20/2022, 9:49 PMPaweł Wangryn (Vangreen)
11/21/2022, 6:33 AMNicolas Hourcard
11/21/2022, 3:00 PMPetr Postulka
11/21/2022, 4:23 PMNov 21 16:15:04 questdb-sophon-raw-data-0 questdb[15121]: 2022-11-21T16:15:04.461795Z I http-server connected [ip=172.16.32.251, fd=9]
Nov 21 16:15:04 questdb-sophon-raw-data-0 questdb[15121]: 2022-11-21T16:15:04.461936Z I i.q.c.h.p.JsonQueryProcessorState [9] exec [q='select * from 'table_name'']
Nov 21 16:15:04 questdb-sophon-raw-data-0 questdb[15121]: 2022-11-21T16:15:04.461945Z I i.q.c.h.p.QueryCache miss [thread=questdb-worker-10, sql=select * from 'table_name']
Nov 21 16:15:04 questdb-sophon-raw-data-0 questdb[15121]: 2022-11-21T16:15:04.462234Z I i.q.g.SqlCompiler plan [q=`**** from (select [****] from table_name timestamp (recorder_ts))`, fd=9]
Nov 21 16:15:04 questdb-sophon-raw-data-0 questdb[15121]: 2022-11-21T16:15:04.462409Z I i.q.c.h.p.JsonQueryProcessorState [9] execute-new [skip: 0, stop: 1000]
Nov 21 16:15:05 questdb-sophon-raw-data-0 questdb[15121]: 2022-11-21T16:15:05.605549Z I i.q.c.h.p.JsonQueryProcessorState [9] Response buffer is too small, state=5
Nov 21 16:15:05 questdb-sophon-raw-data-0 questdb[15121]: 2022-11-21T16:15:05.605562Z I http-server scheduling disconnect [fd=9, reason=11]
Nov 21 16:15:05 questdb-sophon-raw-data-0 questdb[15121]: 2022-11-21T16:15:05.605582Z I http-server disconnected [ip=172.16.32.251, fd=9, src=queue]
Nov 21 16:15:05 questdb-sophon-raw-data-0 questdb[15121]: 2022-11-21T16:15:05.605680Z I i.q.c.h.p.QueryCache push [thread=questdb-worker-13, sql=select * from 'table_name']
Nov 21 16:19:59 questdb-sophon-raw-data-0 questdb[15121]: 2022-11-21T16:19:59.663314Z I i.q.c.p.ReaderPool closed 'table_name' [at=0:0, reason=IDLE]
David Bellizzi
11/22/2022, 12:11 AMNicolas Hourcard
11/22/2022, 9:41 AMNicolas Hourcard
11/22/2022, 9:41 AM