Title
#users-public
i

Ishdutt Trivedi

10/11/2022, 12:52 PM
Hi I'm new to questDB and facing a couple of issues. Can someone help me with it?
Pei

Pei

10/11/2022, 12:54 PM
Hi please give more context about the issue you’re facing.
i

Ishdutt Trivedi

10/12/2022, 6:51 AM
I'm using questDB in a docker container on a remote instance, and facing these issues:1. Not able to copy dump from csv via postgres. Tried using COPY SQL command, but getting this error:
COPY is disabled ['cairo.sql.copy.root' is not set?]
. I tried enabling this setting via setting environment variables:
export QDB_CAIRO_SQL_COPY_ROOT=/var/lib/questdb
. Cross checked the environment variables as well. But still no progress. 2. Unable to create compound index in questDB. Using Alter command, it was giving
cannot create index for [column='t, type=DATE, path=/var/lib/questdb/db/assets][errno=-1]
. Tried creating one at the time of table creation using this command:
CREATE TABLE IF NOT EXISTS asset_metrics (asset SYMBOL INDEX, o FLOAT NOT NULL, h FLOAT NOT NULL, l FLOAT NOT NULL, c FLOAT NOT NULL, v INT, t TIMESTAMP, res SYMBOL INDEX),INDEX(t) timestamp(t);
, but now, I'm not able to see the database schema nor able to fetch data.
Andrey Pechkurov

Andrey Pechkurov

10/12/2022, 7:58 AM
Hello,
export QDB_CAIRO_SQL_COPY_ROOT=/var/lib/questdb
this env variable won't be there when the container starts. You should use
-e QDB_CAIRO_SQL_COPY_ROOT=/var/lib/questdb
command line argument when starting the container instead
8:00 AM
Unable to create compound index in questDB
Compound indexes are not supported. You'd have to add individual indexes to your symbol columns instead:https://questdb.io/docs/concept/indexes/
i

Ishdutt Trivedi

10/12/2022, 10:56 AM
Tried
-e QDB_CAIRO_SQL_COPY_ROOT=/var/lib/questdb
this as well. Still getting this issue.
Andrey Pechkurov

Andrey Pechkurov

10/12/2022, 11:18 AM
Does the database print a similar log line when it starts?
2022-10-12T11:17:35.314588Z A server-main  - sql copy input root: [path=/var/lib/questdb, magic=0x00]
i

Ishdutt Trivedi

10/12/2022, 11:25 AM
Nope. Adding some relevant part of the logs.
2022-10-12T08:56:05.846692Z I i.q.c.t.t.InputFormatConfiguration loading input format config [resource=/text_loader.json]
2022-10-12T08:56:05.865228Z I server-main env config [key=QDB_CAIRO_SQL_COPY_WORK_ROOT]
2022-10-12T08:56:05.909216Z A server-main Config changes applied:
2022-10-12T08:56:05.909270Z A server-main   http.enabled : true
2022-10-12T08:56:05.909292Z A server-main   tcp.enabled  : true
2022-10-12T08:56:05.909309Z A server-main   pg.enabled   : true
2022-10-12T08:56:05.909320Z A server-main open database [id=7587949777157729205.-4565125655869055075]
2022-10-12T08:56:05.909347Z A server-main platform [bit=64]
2022-10-12T08:56:05.909366Z A server-main OS/Arch: linux/amd64 [AVX512,10]
2022-10-12T08:56:05.909786Z A server-main available CPUs: 2
2022-10-12T08:56:05.909900Z A server-main db root: /var/lib/questdb/db
2022-10-12T08:56:05.909921Z A server-main backup root: null
2022-10-12T08:56:05.910005Z A server-main db file system magic: 0x794c7630 [OVERLAYFS] SUPPORTED
Andrey Pechkurov

Andrey Pechkurov

10/12/2022, 11:48 AM
sql copy input root can't be same as the database root directory
11:49 AM
Also, from the above log, it looks like you're setting
QDB_CAIRO_SQL_COPY_WORK_ROOT
, not
QDB_CAIRO_SQL_COPY_ROOT
- these are different config settings
i

Ishdutt Trivedi

10/13/2022, 5:43 AM
Thanks for the help guys! It's working now