clickhouse-upgrade-migration
Upgrade ClickHouse server versions and @clickhouse/client SDK safely. Use when upgrading ClickHouse, handling breaking changes between versions, or migrating from older client libraries. Trigger: "upgrade clickhouse", "clickhouse version upgrade", "update clickhouse client", "clickhouse breaking changes", "new clickhouse version".
What this skill does
# ClickHouse Upgrade & Migration
## Overview
Safely upgrade ClickHouse server and the `@clickhouse/client` Node.js SDK,
with rollback procedures and breaking change detection.
## Prerequisites
- Current ClickHouse version known (`SELECT version()`)
- Git for version control
- Test suite for integration validation
- Staging environment for pre-production testing
## Instructions
### Step 1: Check Current Versions
```bash
# Check server version (via HTTP)
curl 'http://localhost:8123/?query=SELECT+version()'
# Check Node.js client version
npm list @clickhouse/client
# Check latest available
npm view @clickhouse/client version
```
```sql
-- Server-side version details
SELECT
version() AS server_version,
uptime() AS uptime_sec,
currentDatabase() AS current_db;
```
### Step 2: Review Changelog
```bash
# View release notes
open https://github.com/ClickHouse/clickhouse-js/releases
# Server changelog
open https://github.com/ClickHouse/ClickHouse/blob/master/CHANGELOG.md
```
**Key breaking changes to watch for:**
- Client API signature changes (`createClient` options)
- Default setting changes (compression, timeouts)
- New query result format behavior
- Deprecated SQL functions removed in server upgrades
- MergeTree settings renamed or defaults changed
### Step 3: Upgrade the Node.js Client
```bash
git checkout -b upgrade/clickhouse-client
npm install @clickhouse/client@latest
npm test
```
**Common migration patterns:**
```typescript
// v0.x → v1.x: createClient options restructured
// Before (v0.x)
import { createClient } from '@clickhouse/client';
const client = createClient({
host: 'http://localhost:8123',
});
// After (v1.x)
const client = createClient({
url: 'http://localhost:8123', // 'host' renamed to 'url'
});
// v0.x → v1.x: query result handling
// Before: rs.json() returned { data: [...], statistics: {...} }
// After: rs.json() returns the rows array directly
// Before
const result = await rs.json();
const rows = result.data;
// After
const rows = await rs.json();
```
### Step 4: Upgrade ClickHouse Server
**ClickHouse Cloud:** Upgrades happen automatically. Check release notes in
the Cloud console.
**Self-hosted upgrade procedure:**
```bash
# 1. Backup current data
clickhouse-client --query "BACKUP DATABASE analytics TO Disk('backups', 'pre-upgrade')"
# 2. Check compatibility
clickhouse-client --query "SELECT * FROM system.settings WHERE changed"
# 3. Stop server gracefully
sudo systemctl stop clickhouse-server
# 4. Update packages
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install clickhouse-server clickhouse-client
# 5. Start and verify
sudo systemctl start clickhouse-server
clickhouse-client --query "SELECT version()"
# 6. Check for schema issues
clickhouse-client --query "
SELECT database, table, engine, metadata_modification_time
FROM system.tables WHERE database NOT IN ('system', 'INFORMATION_SCHEMA')
"
```
### Step 5: Validate After Upgrade
```typescript
// Post-upgrade validation script
import { createClient } from '@clickhouse/client';
const client = createClient({ url: process.env.CLICKHOUSE_HOST! });
async function validateUpgrade() {
const checks = [
{ name: 'ping', fn: () => client.ping() },
{ name: 'version', fn: async () => {
const rs = await client.query({ query: 'SELECT version()', format: 'JSONEachRow' });
return rs.json();
}},
{ name: 'schema', fn: async () => {
const rs = await client.query({
query: 'SELECT database, name, engine FROM system.tables WHERE database = {db:String}',
query_params: { db: 'analytics' },
format: 'JSONEachRow',
});
return rs.json();
}},
{ name: 'insert', fn: async () => {
await client.insert({
table: 'analytics.events',
values: [{ event_type: 'upgrade_test', user_id: 0, payload: '{}' }],
format: 'JSONEachRow',
});
return { success: true };
}},
{ name: 'query', fn: async () => {
const rs = await client.query({
query: 'SELECT count() AS cnt FROM analytics.events',
format: 'JSONEachRow',
});
return rs.json();
}},
];
for (const check of checks) {
try {
const result = await check.fn();
console.log(`[PASS] ${check.name}:`, JSON.stringify(result));
} catch (err) {
console.error(`[FAIL] ${check.name}:`, (err as Error).message);
}
}
}
validateUpgrade();
```
### Step 6: Rollback Procedure
```text
# Node.js client rollback
npm install @clickhouse/client@<previous-version> --save-exact
# Server rollback (self-hosted)
sudo systemctl stop clickhouse-server
sudo apt-get install clickhouse-server=<previous-version>
sudo systemctl start clickhouse-server
# Restore from backup if needed
clickhouse-client --query "RESTORE DATABASE analytics FROM Disk('backups', 'pre-upgrade')"
```
## Version Compatibility Matrix
| Client Version | Min Server Version | Node.js | Key Changes |
|---------------|-------------------|---------|-------------|
| 1.x | 22.6+ | 18+ | Stable API, `url` option |
| 0.3.x | 22.6+ | 16+ | `host` option, different JSON result shape |
| 0.2.x | 21.8+ | 14+ | Initial release |
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| `Unknown setting` | New default in config | Remove deprecated setting |
| `Cannot parse datetime` | Format change | Update date format strings |
| `Method not found` | Client API changed | Check migration guide |
| `Checksum mismatch` | Corrupted upgrade | Rollback and re-download |
## Resources
- [Client Releases](https://github.com/ClickHouse/clickhouse-js/releases)
- [Server Changelog](https://github.com/ClickHouse/ClickHouse/blob/master/CHANGELOG.md)
- Cloud Upgrades
## Next Steps
For CI/CD integration, see `clickhouse-ci-integration`.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.