Awesome ClickHouseCLI

quarylabs/sqruff

⭐ 1387 Rust repository created 2023-02-13

sqruff is a fast and efficient SQL formatter and linter designed to improve the quality and consistency of SQL code. It supports advanced, customizable linting capabilities that help developers ensure their SQL queries adhere to best practices and style guidelines. The tool also offers automated and configurable formatting options to maintain consistent SQL code style across projects. Written in Rust, sqruff is optimized for speed and minimal overhead, making it suitable for integration into various development workflows, including websites and CI/CD pipelines. One of the key strengths of sqruff is its support for multiple SQL dialects, including ANSI SQL (the default), BigQuery, Athena, Clickhouse, Databricks, DuckDB, MySQL, PostgreSQL, Redshift, Snowflake, SparkSql, SQLite, and Trino. This broad dialect support makes sqruff versatile and applicable to many database environments. Users can try sqruff directly in their browser via an online playground, or install it on macOS, Linux, or other platforms using various methods such as Homebrew, pip, or direct binary downloads. There is also a Visual Studio Code extension available for seamless integration into development environments. sqruff provides commands for linting SQL files or directories and fixing issues automatically. Configuration is flexible through a .sqruff file, where users can specify the SQL dialect, enable or disable specific linting rules, and customize indentation and capitalization settings. It also supports ignoring files or directories via a .sqruffignore file and allows selective ignoring of linting errors on specific lines or ranges using NoQA directives. The project is community-driven, with active support channels and contribution guidelines. It draws inspiration from other notable projects like sqlfluff and ruff, combining their strengths to deliver a powerful SQL linting and formatting tool. Overall, sqruff is a comprehensive, high-performance tool for SQL code quality assurance, supporting a wide range of SQL dialects and offering extensive customization and integration options.

https://github.com/quarylabs/sqruff

ansiansi-sqlathenabigqueryci/cd-integrationclickhousecode-qualityconfigurationdatabricksduckdbformattinglinterlintingmysqlnoqa-directivesopen-sourcepostgresqlredshiftrustsnowflakesparksqlsqlsql-dialectssql-formattersql-lintersqlitetrinovisual-studio-code-extension

Also in CLI

amacneil/dbmate

Dbmate is a lightweight, framework-agnostic database migration tool that supports multiple databases including ClickHouse, enabling consistent schema management across diverse development environments.

sqitchers/sqitch

Sqitch is a versatile and framework-agnostic database change management tool supporting multiple database engines including ClickHouse, emphasizing native scripting, dependency resolution, and deployment integrity.

runreveal/pql

pql is a Go library and CLI tool that compiles a pipelined query language inspired by Kusto Query Language into SQL, with specific compatibility for the Clickhouse SQL dialect but designed to be database agnostic.

azat/chdig

Chdig is a terminal user interface tool designed to provide interactive introspection, monitoring, and debugging capabilities for ClickHouse database systems.

hatarist/clickhouse-cli

An unofficial command-line client for the ClickHouse DBMS server offering enhanced features like autocompletion, syntax highlighting, multiquery support, and user-defined functions over HTTP.

Slach/clickhouse-flamegraph

clickhouse-flamegraph is a command-line utility for visualizing ClickHouse system.trace_log data as flamegraphs to analyze query performance and resource usage.