2

I'm trying to import a table into QuestDB via the /imp REST endpoint. The file contains a single row one with no column row:

a,10.5,True

I'm trying to import it with cURL:

curl -v -F data=@input.csv 'http://localhost:9000/imp?name=my_table'

but geting not enough lines [table=my_table] error.

How do I import a single-line CSV into QuestDB?

Andrei Pechkurov
  • 438
  • 4
  • 10

1 Answers1

2

To import a single-line CSV, you need to specify forceHeader and delimiter query parameters to instruct the database not to expect the column names row and not to try to automatically detect the value delimiter. E.g.:

curl -v -F data=@input.csv 'http://localhost:9000/imp?name=table_name&forceHeader=false&delimiter=%2C'

Here, %2C is URL-encoded comma char.

Andrei Pechkurov
  • 438
  • 4
  • 10