A quick reference SQL command sheet for ClickHouse Cloud field engineers. This documentation is built using Material for MkDocs and contains essential SQL commands.
- Basic Operations (Connection, Databases, Tables)
- Data Operations (Insert, Select, Update/Delete)
- System Commands (Monitoring, Performance)
- Advanced Operations (Materialized Views, Distributed Tables)
- Python 3.8 or higher
- pip (Python package installer)
- Git
- Clone the repository:
git clone https://github.com/maruthiprithivi/click_reference_sheet
cd click_reference_sheet- Create and activate a virtual environment:
# On macOS/Linux
python -m venv venv
source venv/bin/activate
# On Windows
python -m venv venv
.\venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Run the documentation locally:
mkdocs serve- Open your browser and visit
http://127.0.0.1:8000
To build the static site:
mkdocs buildThe built documentation will be in the site directory.
We welcome contributions to improve the ClickHouse SQL Reference Sheet! Here's how you can contribute:
- Go to the Issues page
- Click "New Issue"
- Choose the appropriate issue template:
- Bug Report
- Feature Request
- Documentation Improvement
- Fill in the template with detailed information
- Submit the issue
- Fork the repository
- Create a new branch for your changes:
git checkout -b feature/your-feature-name- Make your changes
- Test locally using
mkdocs serve - Commit your changes:
git add .
git commit -m "Add: brief description of your changes"- Push to your fork:
git push origin feature/your-feature-name- Go to the Pull Requests page
- Click "New Pull Request"
- Select your fork and branch
- Fill in the PR template:
- Description of changes
- Related issues
- Testing performed
- Screenshots (if applicable)
- Submit the PR
- Follow Markdown best practices
- Use clear and concise commit messages
- Keep SQL examples consistent with the existing format
- Include comments in SQL examples where necessary
- Test all SQL commands before submitting
docs/
├── index.md # Main documentation page
├── basic-operations/ # Basic SQL operations
├── data-operations/ # Data manipulation operations
├── system-commands/ # System monitoring and management
└── advanced-operations/ # Advanced features and operations
- Install development dependencies:
pip install -r requirements-dev.txt- Set up pre-commit hooks:
pre-commit installThe pre-commit hooks will:
- Check for trailing whitespace
- Fix end of files
- Check YAML formatting
- Prevent large files (>1MB)
- Check for merge conflicts
- Format Markdown files using mdformat (with GitHub Flavored Markdown support)
- Run pre-commit manually (optional):
pre-commit run --all-files- Run formatter manually (optional):
# Format Markdown files
mdformat .- Run the documentation locally:
mkdocs serve- Check for broken links:
mkdocs build --strictThis project is licensed under the MIT License - see the LICENSE file for details.
- ClickHouse - The open-source columnar database
- Material for MkDocs - The documentation framework
- All contributors who help improve this reference sheet
If you need help or have questions:
- Check the Issues page for existing problems and solutions
- Create a new issue if you can't find an answer
- Join our Discussion forum
This project uses GitHub Actions for continuous integration:
- Automatic deployment to GitHub Pages
- Link checking
- Markdown linting
- Documentation building
The status of the latest deployment can be seen at the top of this README.
This is an active project that is regularly maintained and updated. We welcome contributions from the community to help improve and expand the reference sheet.