I am trying to create a table on a cluster that exists in a testcontainer:
export const createProgramsTable = async (client: ClickHouseClient) => {
await client.exec({
query: `
CREATE TABLE IF NOT EXISTS programs ON CLUSTER '<cluster_name>' (
id String,
name String,
facility_id String,
active Boolean
) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/{installation}/<cluster_name>/tables/{database}/{table}','{replica}') ORDER BY id
`
});
};
Does it work if you send the same query via cURL? In the logs, I see that the setting is properly attached to the search params: query_id=<query_id>&cluster_for_parallel_replicas=<cluster_name>&database=
Describe the bug
I am trying to create a table on a cluster that exists in a
testcontainer
:using
clickhouse/client
:but when I try to create a ClickHouseClient with:
I still receive an error saying
Requested cluster '<cluster_name>' not found.
Error log
ClickHouse server
clickhouse-js/1.4.0 (lv:nodejs/v18.20.4; os:darwin)