| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This is a maintained fork of the original databricks-sql-cli, which is no longer actively maintained. The original project does not support Python 3.12 or later due to outdated dependency pins and deprecated API usage.
This fork updates the project to support Python 3.11 through 3.14, including:
Using pipx (recommended) — installs globally and manages its own virtual environment:
# Install pipx if you don't have it
# Linux: sudo apt install pipx
# Windows: python -m pip install pipx
# Then: pipx ensurepath (restart your terminal)
pipx install "git+https://github.com/jessenich/databricks-sql-cli.git"Using pip:
pip install "git+https://github.com/jessenich/databricks-sql-cli.git"From a release:
pip install "databricks-sql-cli @ https://github.com/jessenich/databricks-sql-cli/releases/download/<tag>/databricks_sql_cli-<version>-py3-none-any.whl"Databricks SQL CLI is a command line interface (CLI) for Databricks SQL that can do auto-completion and syntax highlighting, and is a proud member of the dbcli community.
You'll need Python 3.11 or newer.
python3 -m pip install databricks-sql-cliYou can now run dbsqlcli from your terminal.
To connect with SQL Endpoints dbsqlcli needs the host name and http path from the connection details screen in Databricks SQL and a personal access token. You can provide these to dbsqlcli as command line arguments, by setting environment variables, or by writing them into the [credentials] section of the dbsqlclirc file (see below).
A config file is automatically created at ~/.dbsqlcli/dbsqlclirc at first launch (run dbsqlcli). See the file itself for a description of all available options.
$ dbsqlcli -e 'select id, name from minifigs LIMIT 10'$ dbsqlcli -e query.sql$ dbsqlcli -e query.sql > output.csv$ cd <directory containing dbsqlcli binary>
$ ./dbslqcli [<database_name>]Run the help; command to see a list of shortcuts
$ dbsqlcli --help
Usage: dbsqlcli [OPTIONS] [DATABASE]
A DBSQL terminal querying client with auto-completion and syntax
highlighting.
Examples:
- dbsqlcli
- dbsqlcli my_database
Options:
-e, --execute TEXT Execute a command (or a file) and quit.
--hostname TEXT Hostname [env var: DBSQLCLI_HOST_NAME]
--http-path TEXT HTTP Path [env var: DBSQLCLI_HTTP_PATH]
--access-token TEXT Access Token [env var: DBSQLCLI_ACCESS_TOKEN]
--clirc FILE Location of clirc file.
--table-format TEXT Table format used with -e option.
--help Show this message and exit.We use Poetry for development. Follow the instructions to install Poetry on your system.
Huge thanks to the maintainers of https://github.com/dbcli/athenacli upon which this project is built.
The DBCLI organization on Github maintains CLIs for numerous database platforms including MySQL, Postgres, and MSSQL.
| Back | FazBrowse Home | New Git URL |