clickhouse/clickhouse-go

Golang driver for ClickHouse

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 5 minutes ago
Type:Library / SDKCategory(s):Relational & SQL DatabasesDatabases & Storage
Added to GitGenius on September 20th, 2026
Created on January 11th, 2017
Open Issues & Pull Requests: 167 (+0)
GitHub issues: Enabled
Number of forks: 684
Total Stargazers: 3,345 (+0)
Total Subscribers: 56 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 125
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 603 days
Stale 30+ days: 110
Stale 90+ days: 93

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (113)
  • enhancement (57)
  • needs triage (49)
  • Q1-FY-2026 (29)
  • docs (13)
  • performance (12)
  • discuss (11)
  • feature-completeness (8)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

clickhouse-go is a Go driver for ClickHouse that provides both native and standard database/sql interfaces to the analytics database.

The driver addresses the need to query and write data to ClickHouse from Go applications. It offers two distinct approaches: a native interface that uses ClickHouse's native TCP protocol with direct column encoding for optimal performance, and a standard database/sql interface for compatibility with existing Go tooling and ORMs. Both interfaces support TCP and HTTP transports. The native interface leverages the low-level ch-go client for encoding, decoding, and compression, while the standard interface trades some performance for broader ecosystem compatibility.

Developers should choose the native interface for new performance-sensitive code and the standard database/sql interface when integrating with existing tools or ORMs that expect the standard library's database/sql contract. The driver supports bulk writes, async inserts, connection pooling, failover and load balancing, and a wide range of ClickHouse types including newer additions like Dynamic and Variant. It handles multiple compression algorithms, JWT authentication, and advanced protocol features such as query IDs, quotas, and OpenTelemetry integration through context parameters.

The project maintains active test coverage across supported ClickHouse versions and Go releases, with structured logging via the standard log/slog package. Development tracks compatibility across multiple Go versions, requiring updates to supported version ranges as language releases advance. The codebase includes comprehensive examples demonstrating both native and standard interfaces, bulk operations, and struct marshaling patterns.