ContentSquare / chproxy

Open-Source ClickHouse http proxy and load balancer
https://www.chproxy.org/
MIT License
1.24k stars 256 forks source link

[Feature] <Allow overriding values of allowed parameters at runtime> #402

Open sanyogitaranade opened 4 months ago

sanyogitaranade commented 4 months ago

Is your feature request related to a problem? Please describe. CHProxy allows to specify a list of query string parameters to send to ClickHouse. But it does not allow overriding a value of those parameters at query time.

Describe the solution you'd like e.g. if log_comment is allowed to be passed to ClickHouse with a value value1, when a request is made like echo "select now()" | curl '<chproxy-host>:9001?user=<chproxy-user>&password=<chproxy-password>&log_comment=newValue1' --data-binary @-

log_comment is value1, instead of newValue1.

The desired behavior would be to

  1. allow a set of query string parameters with default values to be sent to ClickHouse
  2. if the value is overriden at query time, pass that value, else send default value