[QUESTION] Using chproxy with clickhouse-client with NodeJS
Which feature your question relates to? Using chproxy in a NodeJS application to run queries
Question details I am looking for examples on using chproxy in my nodeJS application.
I am having trouble trying to query our clickhouse table via chproxy from a nodeJS (TS) server-side application: This is how I form the client which passes the health check when I call .ping()
client = createClient({
url: getEnvVar("DB_URL"),
pathname: "play",
username: getEnvVar("DB_USERNAME"),
password: getEnvVar("DB_PASSWORD"),
})
When I try to query a table I always keep getting this error: select * from DATABASE.TABLE LIMIT 2;
Error: There is no handle /play?query_id=c152ca33-ac4d-4288-810e-2577b45c9bfc
Use / or /ping for health checks.
Or /replicas_status for more sophisticated health checks.
Additional context/motivations "@clickhouse/client": "^1.8.1", The clickhouse version we are running is 24.3.5
unfortunately, on the maintainer side, we're only using chproxy with scala, java and golang clients, which works well. I don't understand what the pathname is supposed to be, did you try without it (leave it blank)? Also, did you try directly using clickhouse, if yes, is it working?
@asif-git-hub why do you use /play endpoint?
It's not how CH http should be used.