> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-parallel-read-in-order-multi-part.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> System table which exists only if ZooKeeper is configured. Shows current connections to ZooKeeper (including auxiliary ZooKeepers).

# system.zookeeper_connection

<Info>
  **Querying in ClickHouse Cloud**

  The data in this system table is held locally on each node in ClickHouse Cloud. Obtaining a complete view of all data, therefore, requires the `clusterAllReplicas` function. See [here](/reference/system-tables/overview#system-tables-in-clickhouse-cloud) for further details.
</Info>

<h2 id="description">
  Description
</h2>

This table does not exist if ZooKeeper is not configured. The 'system.zookeeper\_connection' table shows current connections to ZooKeeper (including auxiliary ZooKeepers). Each row shows information about one connection.

<h2 id="columns">
  Columns
</h2>

* `name` ([String](/reference/data-types/string)) — ZooKeeper cluster's name.
* `host` ([String](/reference/data-types/string)) — The hostname/IP of the ZooKeeper node that ClickHouse connected to.
* `port` ([UInt16](/reference/data-types/int-uint)) — The port of the ZooKeeper node that ClickHouse connected to.
* `index` ([Nullable(UInt8)](/reference/data-types/nullable)) — The index of the ZooKeeper node that ClickHouse connected to. The index is from ZooKeeper config. If not connected, this column is NULL.
* `connected_time` ([DateTime](/reference/data-types/datetime)) — When the connection was established.
* `session_uptime_elapsed_seconds` ([UInt64](/reference/data-types/int-uint)) — Seconds elapsed since the connection was established.
* `is_expired` ([UInt8](/reference/data-types/int-uint)) — Is the current connection expired.
* `keeper_api_version` ([UInt8](/reference/data-types/int-uint)) — Keeper API version.
* `client_id` ([Int64](/reference/data-types/int-uint)) — Session id of the connection.
* `xid` ([Int64](/reference/data-types/int-uint)) — XID of the current session.
* `enabled_feature_flags` ([Array(Enum16('FILTERED\_LIST' = 0, 'MULTI\_READ' = 1, 'CHECK\_NOT\_EXISTS' = 2, 'CREATE\_IF\_NOT\_EXISTS' = 3, 'REMOVE\_RECURSIVE' = 4, 'MULTI\_WATCHES' = 5, 'CHECK\_STAT' = 6, 'PERSISTENT\_WATCHES' = 7, 'CREATE\_WITH\_STATS' = 8, 'TRY\_REMOVE' = 9, 'LIST\_WITH\_STAT\_AND\_DATA' = 10, 'GET\_CHILDREN\_RECURSIVE' = 11, 'CREATE\_TTL' = 12, 'CREATE\_CONTAINER' = 13, 'MAX\_REQUEST\_SIZE' = 14, 'LIST\_WITH\_OPTIONS' = 15))](/reference/data-types/array)) — Feature flags which are enabled. Only applicable to ClickHouse Keeper.
* `availability_zone` ([String](/reference/data-types/string)) — Availability zone
* `session_timeout_ms` ([UInt64](/reference/data-types/int-uint)) — Session timeout (in milliseconds)
* `last_zxid_seen` ([Int64](/reference/data-types/int-uint)) — Last zxid seen by the current session.

<h2 id="examples">
  Examples
</h2>

```sql theme={null}
SELECT
    name,
    host,
    port,
    index,
    connected_time,
    session_uptime_elapsed_seconds,
    is_expired,
    keeper_api_version,
    client_id,
    xid,
    enabled_feature_flags,
    availability_zone
FROM system.zookeeper_connection;
```

```text theme={null}
┌─name────┬─host──────┬─port─┬─index─┬──────connected_time─┬─session_uptime_elapsed_seconds─┬─is_expired─┬─keeper_api_version─┬─client_id─┬─xid─┬─enabled_feature_flags────────────────────────────────────────────────────┬─availability_zone─┐
│ default │ 127.0.0.1 │ 2181 │     0 │ 2025-04-10 14:30:00 │                            943 │          0 │                  0 │       420 │  69 │ ['FILTERED_LIST','MULTI_READ','CHECK_NOT_EXISTS','CREATE_IF_NOT_EXISTS'] │ eu-west-1b        │
└─────────┴───────────┴──────┴───────┴─────────────────────┴────────────────────────────────┴────────────┴────────────────────┴───────────┴─────┴──────────────────────────────────────────────────────────────────────────┴───────────────────┘
```
