-
-
Notifications
You must be signed in to change notification settings - Fork 71
Connection string
Oleg V. Kozlyuk edited this page Mar 4, 2020
·
23 revisions
Parameter name | Description | Value if omitted |
---|---|---|
Database | Initial database for connection | default |
Username | Authentication username | default |
Password | Authentication password | |
Host | ClickHouse server address | localhost |
Port | ClickHouse server port | 8123 |
Driver | select driver for use. Values: Binary, JSON, TSV | Binary |
Compression | Enables or disables compression of data | false |
UseSession | Enables use of server sessions | false |
Timeout | Sets HTTP timeout length | 120 |
Example:
Host=clickhouse;Port=8123;Username=default;password=;Database=default
UseSession
flag enables persistence of server session, allowing use of SET
statements and temp tables. Session will be reset after 60 seconds of inactivity (default timeout). Session lifetime can be extended by setting session settings via ClickHouse statements
ClickHouseConnection
class normally allows for parallel operation (multiple threads can run queries concurrently). However, enabling UseSession
flag will limit that to one active query per connection at any moment of time (serverside limitation)