Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to intercept all sql queries? #419

Open
gonemooncool opened this issue Nov 1, 2024 · 1 comment
Open

How to intercept all sql queries? #419

gonemooncool opened this issue Nov 1, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@gonemooncool
Copy link

I want to track all queries that go through clickhouse_connect, including “service” requests.

In driver.client.Client._init_common_settings there are some “service” queries that I cannot intercept. Is there any way to intercept any queries that go through clickhouse_connect without rewriting driver.client.Client?

@genzgd
Copy link
Collaborator

genzgd commented Nov 1, 2024

There is not currently a way to do that. It might make sense to add a "hook" within the query* or _raw_query Client methods to allow this sort of functionality.

@genzgd genzgd added the enhancement New feature or request label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants