Skip to content

epam/TimeBaseClickhouseConnector

Repository files navigation

Timebase ClickHouse Connector

Overview

ClickHouse is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP) that allows to generate analytical reports using SQL queries in real-time.

TimeBase stores time series events as Messages and each type of event has a personal message class assigned to it in TimeBase. Message class has a set of fields (attributes) that characterize, describe, identify each specific type of event. In object-oriented programing languages messages can be seen as classes, each with a specific set of fields. Messages are stored in Streams chronologically by their timestamps for each symbol. Refer to a Basic Concepts page to learn more about TimeBase main principles and data structure.

To replicate TimeBase stream data to ClickHouse, we take objects and classes from a particular TimeBase stream and unfold them so each field corresponds to a particular ClickHouse table column. Timestamp, Partition and Instrument are auto generated and common for all ClickHouse tables where Instrument + Timestamp = PrimaryKey. ClickHouse tables are named after TimeBase stream names. Tables rows are created for each TimeBase message in a chronological order.

Features

  • Supports replicating queries and streams.
  • Support custom tables with subset of columns
  • Only strick columns data types mapping
  • Failover support, is case of disconnects or unforces errors.

How to Build

You will require the Java 11+ and git-lfs to build.

Build the project with Gradle using this build.gradle file.

Full clean and build of all modules

    $ ./gradlew clean build

To build Docker image use

    $ ./gradlew :java:clickhouse-connector:dockerBuildImage

How to Run

    $ ./gradlew :java:clickhouse-connector:bootRun -Dspring.config.additional-location=<path to configuration file>	

Configuration template: config

Sample configuration for docker-compose: docker-compose

License

Copyright © 2023 EPAM Systems, Inc.

Distributed under the Apache License, Version 2.0.

SPDX-License-Identifier: Apache-2.0

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages