TimonKK / clickhouse

NodeJS client for ClickHouse
Apache License 2.0
221 stars 122 forks source link

Parse error when running cluster queries #144

Closed nour-borgi closed 1 year ago

nour-borgi commented 1 year ago

Hi All.

Faced parsing error when running on cluster query.

The query that I m running:

CREATE TABLE default.default_table_clnnusteddd ON CLUSTER '{cluster}' (
    createdAt Date,
    updatedAt Date
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{cluster}/{shard}/{table}', '{replica}')
ORDER BY tuple();

The code throwing error:

const r = await clickhouse.query(query).toPromise();

The error I m getting: image

My code works perfectly in single node clickhouse.

Any quick help on this ? Thank you.

nour-borgi commented 1 year ago

Setting raw when instantiation of Clickhouse to true removed the parse error but no able to catch any errors anymore.

Can you give updates on this please. Thanks:)