clickhouse-local-development

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ClickHouse Local Development with chv

借助chv进行ClickHouse本地开发

Step-by-step guides for local ClickHouse development using the chv CLI. Covers installing and managing ClickHouse versions, initializing projects with a suggested SQL file structure, running a local server, executing SQL from files, and migrating to ClickHouse Cloud.
Official docs: ClickHouse
这是一系列使用chv CLI进行ClickHouse本地开发的分步指南。内容涵盖安装和管理ClickHouse版本、使用推荐的SQL文件结构初始化项目、运行本地服务器、从文件执行SQL以及迁移至ClickHouse Cloud。
官方文档: ClickHouse

IMPORTANT: How to Apply This Skill

重要提示:如何使用本技能

Before answering chv or local ClickHouse development questions, follow this priority order:
  1. Check for applicable guides in the
    guides/
    directory
  2. If a guide exists: Follow it and cite it in your response using "Per
    guide-name
    ..."
  3. If no guide exists: Use the LLM's ClickHouse knowledge or search documentation
  4. If uncertain: Use web search for current best practices
  5. Always cite your source: guide name, "general ClickHouse guidance", or URL
Why guides take priority: The chv CLI is a prototype tool with specific command syntax. The guides encode the exact flags and workflows that have been verified against the CLI.

在回答关于chv或ClickHouse本地开发的问题前,请遵循以下优先级顺序:
  1. guides/
    目录中查找适用的指南
  2. 如果存在相关指南: 按照指南操作,并在回复中使用“根据
    guide-name
    ...”格式引用该指南
  3. 如果没有相关指南: 使用大语言模型的ClickHouse相关知识或查阅官方文档
  4. 如果不确定: 通过网络搜索获取当前最佳实践
  5. 务必注明来源: 指南名称、“通用ClickHouse指导”或相关URL
为何指南优先级最高: chv CLI是一款原型工具,具有特定的命令语法。指南中记录了经过CLI验证的精确参数和工作流程。

Workflow Procedures

工作流程步骤

For Local Development Setup

本地开发环境搭建

Read these guide files in order:
  1. guides/setup-install.md
    — Install chv and a ClickHouse version
  2. guides/local-init.md
    — Initialize a project-local data directory
  3. guides/local-run-server.md
    — Start a local ClickHouse server
  4. guides/local-run-client.md
    — Execute SQL files with the ClickHouse client
请按顺序阅读以下指南文件:
  1. guides/setup-install.md
    — 安装chv和某个ClickHouse版本
  2. guides/local-init.md
    — 初始化项目本地数据目录
  3. guides/local-run-server.md
    — 启动本地ClickHouse服务器
  4. guides/local-run-client.md
    — 使用ClickHouse客户端执行SQL文件

For Migrating to Cloud

迁移至云端

Read these guide files in order:
  1. setup-auth
    (from
    clickhouse-cloud
    skill) — Create a Cloud account and configure API credentials
  2. service-create
    (from
    clickhouse-cloud
    skill) — Create a Cloud service
  3. guides/migrate-local-to-cloud.md
    — Deploy your SQL files and data to the Cloud service

请按顺序阅读以下指南文件:
  1. setup-auth
    (来自
    clickhouse-cloud
    技能) — 创建云账户并配置API凭证
  2. service-create
    (来自
    clickhouse-cloud
    技能) — 创建云服务实例
  3. guides/migrate-local-to-cloud.md
    — 将SQL文件和数据部署至云服务实例

Guide Categories

指南分类

#SectionPrefixGuidesDescription
1Setup
setup-
1Install chv CLI and manage ClickHouse versions
2Local Development
local-
3Init projects, run server, run client
3Migration
migrate-
1Migrate data from local dev to cloud

序号分类前缀指南数量描述
1安装配置
setup-
1安装chv CLI并管理ClickHouse版本
2本地开发
local-
3初始化项目、运行服务器、运行客户端
3迁移
migrate-
1将数据从本地开发环境迁移至云端

Quick Reference

快速参考

Setup

安装配置

  • setup-install
    — Install chv CLI and manage ClickHouse versions
  • setup-install
    — 安装chv CLI并管理ClickHouse版本

Local Development

本地开发

  • local-init
    — Initialize project with data directory and SQL file structure
  • local-run-server
    — Run a local ClickHouse server
  • local-run-client
    — Execute SQL files with the ClickHouse client
  • local-init
    — 初始化项目,创建数据目录和推荐的SQL文件结构
  • local-run-server
    — 运行本地ClickHouse服务器
  • local-run-client
    — 使用ClickHouse客户端执行SQL文件

Migration

迁移

  • migrate-local-to-cloud
    — Export local data and import to cloud

  • migrate-local-to-cloud
    — 导出本地数据并导入至云端

When to Apply

适用场景

This skill activates when you encounter:
  • Installing or using
    chv
    CLI
  • Managing ClickHouse versions locally
  • Setting up a local ClickHouse development environment
  • Initializing a ClickHouse project directory
  • Running a local ClickHouse server
  • Migrating from local ClickHouse to Cloud
  • Executing SQL files with chv
  • Questions about
    chv run
    ,
    chv install
    ,
    chv init
    ,
    chv use
    , or
    chv which

当遇到以下场景时可使用本技能:
  • 安装或使用
    chv
    CLI
  • 本地管理ClickHouse版本
  • 搭建ClickHouse本地开发环境
  • 初始化ClickHouse项目目录
  • 运行本地ClickHouse服务器
  • 从本地ClickHouse迁移至云端
  • 使用chv执行SQL文件
  • 关于
    chv run
    chv install
    chv init
    chv use
    chv which
    的问题

Related Skills

相关技能

  • clickhouse-cloud
    — For ClickHouse Cloud service management: API credentials, service creation, sizing, security, and backups
  • clickhouse-best-practices
    — For ClickHouse schema design, query optimization, and data ingestion best practices

  • clickhouse-cloud
    — 用于ClickHouse Cloud服务管理:API凭证、服务创建、规格调整、安全设置和备份
  • clickhouse-best-practices
    — 用于ClickHouse schema设计、查询优化和数据导入最佳实践

Full Compiled Document

完整编译文档

For the complete guide with all content expanded inline:
AGENTS.md
Use
AGENTS.md
when you need to reference multiple guides quickly without reading individual files.
如需查看所有内容内联展开的完整指南,请查阅
AGENTS.md
当你需要快速引用多个指南而无需阅读单个文件时,请使用
AGENTS.md