apla / node-clickhouse

Yandex ClickHouse driver for nodejs
MIT License
216 stars 50 forks source link

CLI #4

Closed levonet closed 4 years ago

levonet commented 6 years ago

Добавил cli. Мне он нужен для создания таблиц и вставок csv, но и select как-то работает. Написать тест на cli не осилил.


Introducing CLI. I'm using it to create tables and inserting from csv, and select works too. There is no tests for now.

nezed commented 4 years ago

Is there any CLI needed when HTTP interface and dockerized clickhouse-client is available? This question still opened for me.

Please, vote this PR and leave your feedback!

levonet commented 4 years ago

You can use curl.

cat data.csv | curl -X 'http://localhost:8123/?query=INSERT%20INTO%20db.table%20FORMAT%20CSV' --data-binary @-

But it not always useful. You must process a response from ClickHouse to catch errors.

levonet commented 4 years ago

I'm sorry. It's a question was for me. You can close PR.