Closed happyharry123 closed 5 years ago
Think your auth is not correct. This config will help.
var options = {
host: '160.xx.xx.xxx',
port: 8123
auth: 'abc123:paswword123',
dataObjects: 'FORMAT JSON'
};
Thank you Vickas. Your solution is correct, you save my day! Thank you.
Solved, probably must be fixed with #34
Hey apla, I have a trouble on connecting clickhouse with nodejs. I am now working with you sample code and some questions pop-up with the clickhouse options. I just want to know it is correct of the options format? Thank you a lot for this modules with clickhouse!
`var ClickHouse = require ('@apla/clickhouse'); var options = { host: '160.xx.xx.xxx:8123', auth:{ user:'abc123', password:'paswword123' }, }; var ch = new ClickHouse (options); var stream = ch.query ("SELECT * from xxx limit 1");
// or collect records yourself var rows = [];
stream.on ('metadata', function (columns) { // do something with column list }); ` I got an error about