Private
Public Access
1
0

scores: clickhouse support
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-20 19:41:02 -07:00
parent 5682c86837
commit 6df51fc19f
9 changed files with 309 additions and 58 deletions

View File

@@ -36,7 +36,7 @@ func (d *ClickHouse) UserCountryData(ctx context.Context) (*UserCountry, error)
ctx, span := tracing.Tracer().Start(ctx, "UserCountryData")
defer span.End()
rows, err := d.conn.Query(clickhouse.Context(ctx, clickhouse.WithSpan(span.SpanContext())),
rows, err := d.Logs.Query(clickhouse.Context(ctx, clickhouse.WithSpan(span.SpanContext())),
"select max(dt) as d,UserCC,Qtype,sum(queries) as queries from by_usercc_1d where dt > now() - INTERVAL 4 DAY group by rollup(Qtype,UserCC) order by UserCC,Qtype;")
if err != nil {
log.ErrorContext(ctx, "query error", "err", err)