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

Is there a way to have system.query_log in chdb ? #261

Open
LPauzies opened this issue Aug 29, 2024 · 0 comments
Open

Is there a way to have system.query_log in chdb ? #261

LPauzies opened this issue Aug 29, 2024 · 0 comments
Labels
question Further information is requested Session

Comments

@LPauzies
Copy link

I'm currently using chdb for our test suite. But as I use multiple 3rd party elements within the same test function, I would want to know what are the queries executed during each of my test functions.

To achieve this with a real ClickHouse, a call at the end of my function to system.query_log is sufficient for the current session.
How can I have the same behavior using chdb ?

Here is the current tables inside system (show tables in system):

{
        "meta":
        [
                {
                        "name": "name",
                        "type": "String"
                }
        ],

        "data":
        [
                {
                        "name": "aggregate_function_combinators"
                },
                {
                        "name": "backups"
                },
                {
                        "name": "build_options"
                },
                {
                        "name": "collations"
                },
                {
                        "name": "columns"
                },
                {
                        "name": "contributors"
                },
                {
                        "name": "current_roles"
                },
                {
                        "name": "data_skipping_indices"
                },
                {
                        "name": "data_type_families"
                },
                {
                        "name": "databases"
                },
                {
                        "name": "dropped_tables"
                },
                {
                        "name": "enabled_roles"
                },
                {
                        "name": "errors"
                },
                {
                        "name": "events"
                },
                {
                        "name": "formats"
                },
                {
                        "name": "functions"
                },
                {
                        "name": "grants"
                },
                {
                        "name": "kafka_consumers"
                },
                {
                        "name": "licenses"
                },
                {
                        "name": "merge_tree_settings"
                },
                {
                        "name": "numbers"
                },
                {
                        "name": "numbers_mt"
                },
                {
                        "name": "one"
                },
                {
                        "name": "privileges"
                },
                {
                        "name": "quota_limits"
                },
                {
                        "name": "quota_usage"
                },
                {
                        "name": "quotas"
                },
                {
                        "name": "quotas_usage"
                },
                {
                        "name": "replicated_merge_tree_settings"
                },
                {
                        "name": "rocksdb"
                },
                {
                        "name": "role_grants"
                },
                {
                        "name": "roles"
                },
                {
                        "name": "row_policies"
                },
                {
                        "name": "scheduler"
                },
                {
                        "name": "schema_inference_cache"
                },
                {
                        "name": "server_settings"
                },
                {
                        "name": "settings"
                },
                {
                        "name": "settings_changes"
                },
                {
                        "name": "settings_profile_elements"
                },
                {
                        "name": "settings_profiles"
                },
                {
                        "name": "stack_trace"
                },
                {
                        "name": "table_engines"
                },
                {
                        "name": "table_functions"
                },
                {
                        "name": "tables"
                },
                {
                        "name": "time_zones"
                },
                {
                        "name": "user_directories"
                },
                {
                        "name": "users"
                },
                {
                        "name": "warnings"
                },
                {
                        "name": "zeros"
                },
                {
                        "name": "zeros_mt"
                }
        ],

        "rows": 50,

        "statistics":
        {
                "elapsed": 0.00140087,
                "rows_read": 0,
                "bytes_read": 0
        }
}

Thanks 🙏

@LPauzies LPauzies added the question Further information is requested label Aug 29, 2024
@auxten auxten added the Session label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Session
Projects
None yet
Development

No branches or pull requests

2 participants