Connecting to ClickHouse
Prerequisites
- PuppyGraph version 0.73 or higher
- The ClickHouse instance is accessible over the network from the PuppyGraph instance.
Configuration
| Configuration | Explanation |
|---|---|
| Username | The username of the database |
| Password | The password of the database |
| JDBC URI | A JDBC compatible connection URI of the data source. Read this page for more details on how to construct the URI. |
| JDBC Driver Class | The class name of the JDBC Driver. The default value is |
| JDBC Driver URL | The URL of the ClickHouse JDBC Driver. Please choose the version of the driver that is compatible with your Clickhouse database. |
Demo
See Querying ClickHouse Data as a Graph for a complete demo for ClickHouse. The demo includes setting up the connection to a ClickHouse instance.
Data Type Mapping
| ClickHouse Type | PuppyGraph Type | Description |
|---|---|---|
Boolean |
Boolean |
True or false |
Int8 |
Byte |
8-bit signed integers |
Int16 |
Short |
16-bit signed integers |
UInt8 |
Short |
8-bit unsigned integers |
Int32 |
Int |
32-bit signed integers |
UInt16 |
Int |
16-bit unsigned integers |
Nullable(Int32) |
Int |
Nullable 32-bit signed integers |
Int64 |
Long |
64-bit signed integers |
UInt32 |
Long |
32-bit unsigned integers |
UInt64 |
HugeInt |
Unsigned 64-bit integers |
Float32 |
Float |
32-bit IEEE 754 floating point |
Float64 |
Double |
64-bit IEEE 754 floating point |
Decimal(P, S) |
Decimal(P, S) |
Fixed-point decimal; precision P, scale S |
Decimal32(S) |
Decimal(P, S) |
Fixed-point decimal, 32-bit; scale S |
Decimal64(S) |
Decimal(P, S) |
Fixed-point decimal, 64-bit; scale S |
Decimal128(S) |
Decimal(P, S) |
Fixed-point decimal, 128-bit; scale S |
String |
String |
Arbitrary-length character sequences |
FixedString |
String |
Fixed-length character sequences |
Enum8 |
String |
8-bit enumerated values |
Enum16 |
String |
16-bit enumerated values |
UUID |
String |
Universally unique identifier |
LowCardinality(String) |
String |
Low cardinality string optimization |
Date |
Date |
Calendar date without timezone or time |
Date32 |
Date |
Extended range calendar date |
DateTime |
DateTime |
Timestamp with second precision |
DateTime64 |
DateTime |
Timestamp with microsecond precision |
Array(T) |
Array<T> |
A collection of values of element type T |
Nested |
Array<T> |
Nested data structure |