v.20.5Improvement

Allow passing quota_key in clickhouse-client

Allow to pass quota_key in clickhouse-client. This closes #10227. #10270 (alexey-milovidov).
Added support for specifying a quota_key parameter in clickhouse-client to control and apply user quotas during client sessions.

Why it matters

This feature addresses the need to enforce quota limits on queries executed via clickhouse-client by allowing users to explicitly provide a quota_key. It ensures the proper application of quota rules for different users or groups, enhancing resource management and preventing quota misattribution when multiple clients share the same credentials.

How to use it

When launching clickhouse-client, use the new --quota_key parameter followed by the desired quota key string. For example:
clickhouse-client --quota_key=my_custom_quota_key

This will apply the quota associated with my_custom_quota_key during the session.