无法以只读模式插入表

时间:2019-03-09 11:14:51

标签: node.js clickhouse

当我尝试在Clickhouse数据库中插入记录时,我遇到了以下异常情况:

例外:

Code: 164, e.displayText() = DB::Exception: Cannot insert into table in readonly mode, e.what() = DB::Exception

节点程序包:

https://www.npmjs.com/package/clickhouse

连接代码:

const clickhouse = new ClickHouse({
url: 'http://localhost',
port: 8123,
debug: true,
database: 'mydb',
basicAuth: 'default',
username: '',
password: '',
isUseGzip: false,
config: {
    session_timeout                         : 60,
    output_format_json_quote_64bit_integers : 0,
    enable_http_compression                 : 0
},

});

表架构:

CREATE TABLE logs_1 ( trid UInt64,  date UInt32,  email String) ENGINE = Log;

0 个答案:

没有答案