in timescaledb-connector/src/main/java/com/epam/deltix/timebase/connector/service/timescale/TimescaleSchemaDefinition.java [88:119]
public TimescaleSchema getTimebaseSchemaDefinition(ObjectArrayList<ClassDescriptorInfo> classDescriptors, String streamName) {
TimescaleSchema schema = new TimescaleSchema();
schema.setName(streamName);
schema.setColumns(descriptorService.getColumnsFromMessages(classDescriptors));
//add Id, EventTime, symbol, instrumentType
TimescaleColumn id = TimescaleColumn.builder()
.dataType(TimescaleColumn.TimescaleDataType.SERIAL)
.relatedDescriptors(Collections.emptyList())
.name("Id")
.build();
schema.getColumns().add(id);
TimescaleColumn eventTime = TimescaleColumn.builder()
.dataType(TimescaleColumn.TimescaleDataType.DATETIME)
.relatedDescriptors(Collections.emptyList())
.name("EventTime")
.build();
schema.getColumns().add(eventTime);
TimescaleColumn symbol = TimescaleColumn.builder()
.dataType(TimescaleColumn.TimescaleDataType.VARCHAR)
.relatedDescriptors(Collections.emptyList())
.name("Symbol")
.build();
schema.getColumns().add(symbol);
schema.setPrimaryKey(new TimescaleColumn[]{id, eventTime});
return schema;
}