chproxy icon indicating copy to clipboard operation
chproxy copied to clipboard

pass format_schema query param setting to clickhouse

Open kcking opened this issue 5 years ago • 3 comments

We are setting format_schema as a query parameter in our POST request, however when chproxy proxies the request, this parameter is not included and Clickhouse errors with DB::Exception: The format Protobuf requires a schema. The 'format_schema' setting should be set (version 19.14.6.12 (official build))

This would be resolved if chproxy forwarded this query parameter to the server.

kcking avatar Sep 30 '19 22:09 kcking

Hi @kcking ! Pls see similar issue https://github.com/Vertamedia/chproxy/issues/62

hagen1778 avatar Oct 01 '19 05:10 hagen1778

#62 helped solve a similar problem I had. thanks @hagen1778

a snippet of something like an example config for future visitors:

...
users:
  - name: "mux"
    password: "asdf1234"
    to_cluster: "clickhouse"
    to_user: "default"
    params: "protoplz"
param_groups:
  - name: "protoplz"
    params:
      - key: "format_schema"
        value: "the_proto_file:MessageName"
...

theRealWardo avatar Nov 13 '20 02:11 theRealWardo

We should include this real use case example in documentation.

gontarzpawel avatar Feb 17 '22 08:02 gontarzpawel