Add LowCardinality host/measurement
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -160,10 +160,10 @@ func (ch *ClickHouse) toDatatype(value interface{}) string {
|
||||
|
||||
func (ch *ClickHouse) toNullableDatatype(key string, value interface{}) string {
|
||||
datatype := ch.toDatatype(value)
|
||||
if key != "host" && key != ch.TimestampColumn && key != "measurement" {
|
||||
return fmt.Sprintf("Nullable(%s)", datatype)
|
||||
if key == "host" || key == "measurement" {
|
||||
return fmt.Sprintf("LowCardinality(%s)", datatype)
|
||||
}
|
||||
return datatype
|
||||
return fmt.Sprintf("Nullable(%s)", datatype)
|
||||
}
|
||||
|
||||
func (ch *ClickHouse) pepareMetrics(metrics []telegraf.Metric, metricsData map[string][]map[string]interface{}, columns map[string]*orderedmap.OrderedMap[string, string]) {
|
||||
|
Reference in New Issue
Block a user