From be49fcfa5b4ee99ade9e0f02f30eea2988db259a Mon Sep 17 00:00:00 2001 From: wangxinbo Date: Fri, 19 May 2023 16:52:56 +0800 Subject: [PATCH] Allow writing non-numeric metric --- CHANGELOG.md | 5 +++-- output/clickhouse.go | 5 +---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88b42c3b..0bcb408c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,11 @@ # Changelog -#### Version 3.0.6 (TBD) +#### Version 3.0.6 (2023-05-19) Improvements: -- When idenfying new columns, also update the schema of tables that are part of a logical cluster +- When idenfying new columns, also update the schema of tables that are part of a logical cluster +- Allow writing non-numeric type metric #### Version 3.0.5 (2023-05-12) diff --git a/output/clickhouse.go b/output/clickhouse.go index ab1a379e..50042b3e 100644 --- a/output/clickhouse.go +++ b/output/clickhouse.go @@ -283,9 +283,6 @@ func (c *ClickHouse) initSeriesSchema(conn clickhouse.Conn) (err error) { if dim.Name == "__series_id" && dim.Type.Type == model.Int64 { dimSerID = dim c.Dims = append(c.Dims[:i], c.Dims[i+1:]...) - } else if dim.Type.Type == model.String { - c.Dims = append(c.Dims[:i], c.Dims[i+1:]...) - util.Logger.Warn("non-numeric type metric ignored", zap.String("metric name", dim.Name)) } else { i++ } @@ -441,7 +438,7 @@ func (c *ClickHouse) initSchema() (err error) { } } if !withDistTable { - err = errors.Newf("Please create distributed table for %s in cluster '%s'.", c.seriesTbl, c.cfg.Clickhouse.Cluster) + err = errors.Newf("Please create distributed table for %s in cluster '%s'.", c.TableName, c.cfg.Clickhouse.Cluster) return } }