TimeBase connector to Timescale instruction.


Use our proprietary open source connector to replicate TimeBase streams to Timescale database.

Timescale is a relational database for time-series data, built as a PostgreSQL extension with full support of SQL features. Refer to Timescale Documentation to learn more.

TimeBase being a time-series database 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 Timescale, we take fields, objects and classes from a particular TimeBase stream and unfold them so each field corresponds to a particular Timescale table column. In case of an ARRAY of objects, data is inserted in a Timescale table as a JSON object, that contains all array elements and their fields. EventTime, Id and Symbol are auto generated and common for all Timescale tables where EventTime + Id = PrimaryKey. EventTime is mapped on a TimeBase message timestamp, Symbol on a TimeBase message symbol, id is an auto generated sequence by PostrgeSQL. Timescale tables are named after TimeBase stream names. Tables rows are created for each TimeBase message in a chronological order. Data is replicated in batches (TIMEBASE_BATCH_SIZE parameter if the application config to set the number of messages in one batch).