This documentation page assumes that you already have a SeekTable account. Create your free account by signing up.

Yandex ClickHouse pivot table reports

ClickHouse can be used as a data source with SQL-compatible database connector. There are 2 ways how clients may connect to ClickHouse:

SeekTable supports both ways with 2 different ClickHouse drivers.

Native TCP/IP Protocol

Connection String example (ClickHouse.Ado .NET driver):

Host=hostName;Port=9000;Database=default;Compress=True;Compressor=lz4;BufferSize=8192;User=default;Password=
Host Specifies the host name of the machine on which the ClickHouse is running.
Port Port of ClickHouse TCP listener (9000 by default).
Database The ClickHouse database to connect to.
BufferSize TCP client receive buffer size. Default value is 1024 which may be to small if you need to load thousands of rows for your reports.
User The username to connect with.
Password The password to connect with.
Compress if true compression is used for packets sent between SeekTable and ClickHouse server.

HTTP(S) Interface

Connection String example (ClickHouse.Client .NET driver):

Driver=ClickHouse.Client;Compression=True;Host=hostName;Port=8123;Database=default;Username=default;Password=
Driver Should be ClickHouse.Client if you want to connect to CH with HTTP(S) interface.
Host Specifies the host name of the machine on which the ClickHouse is running.
Port Port of ClickHouse HTTP interface listener (8123 by default).
Protocol Can be http or https.
Database The ClickHouse database to connect to.
Username The username to connect with.
Password The password to connect with.
Compression if true gzip compression is used.

Important: with this driver parameters placeholders in "Select Query" should be formatted like in CLI. For example:

@paramName[ column={{{0}:Int32}} ]
where {{ is resolved to { and {0} inserts a parameter name (which is "paramName" in this sample).



Looking for an embedded solution? Try PivotData microservice which can be seamlessly integrated into any web application for pivot tables generation by ClickHouse with simple web API.