https://github.com/columnar-tech/databow
A command-line tool for querying databases
https://github.com/columnar-tech/databow
adbc apache-arrow cli database sql
Last synced: about 4 hours ago
JSON representation
A command-line tool for querying databases
- Host: GitHub
- URL: https://github.com/columnar-tech/databow
- Owner: columnar-tech
- License: apache-2.0
- Created: 2026-01-30T23:39:58.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-06-29T23:11:29.000Z (about 6 hours ago)
- Last Synced: 2026-06-30T00:20:18.498Z (about 5 hours ago)
- Topics: adbc, apache-arrow, cli, database, sql
- Language: Rust
- Homepage: https://docs.columnar.tech/databow
- Size: 625 KB
- Stars: 220
- Watchers: 2
- Forks: 8
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# databow
[](https://docs.columnar.tech/databow/)
[](https://github.com/columnar-tech/databow/releases)
[](https://github.com/columnar-tech/databow/actions/workflows/ci.yaml)
[](LICENSE)
A command-line tool for querying databases via [ADBC](https://arrow.apache.org/adbc/current/index.html).

## Highlights
- **Multi-database support** - Connect to any database with a compatible ADBC driver
- **Interactive SQL shell** - Execute SQL queries with command history and intuitive navigation
- **Syntax highlighting** - SQL queries highlighted for improved readability
- **Formatted output** - Results displayed in clean, aligned tables with dynamic column width
- **File export** - Export query results to JSON, CSV, or Arrow IPC files
- **Fast and lightweight** - Built in Rust for high performance and minimal resource usage
## Installation
Install with [uv](https://docs.astral.sh/uv/):
```sh
uv tool install databow
```
Install with [Cargo](https://doc.rust-lang.org/cargo/):
```sh
cargo install databow
```
## Getting Started
Install the DuckDB ADBC driver with [dbc](https://docs.columnar.tech/dbc/):
```sh
dbc install duckdb
```
### Interactive Usage
Connect to DuckDB (in-memory):
```sh
databow --driver duckdb
```
Execute SQL queries:
```
> CREATE TABLE penguins AS FROM 'https://blobs.duckdb.org/data/penguins.csv';
┌───────┐
│ Count │
├───────┤
│ 344 │
└───────┘
> SELECT *
. FROM penguins
. LIMIT 5;
┌─────────┬───────────┬────────────────┬───────────────┬───────────────────┬─────────────┬────────┬──────┐
│ species │ island │ bill_length_mm │ bill_depth_mm │ flipper_length_mm │ body_mass_g │ sex │ year │
├─────────┼───────────┼────────────────┼───────────────┼───────────────────┼─────────────┼────────┼──────┤
│ Adelie │ Torgersen │ 39.1 │ 18.7 │ 181 │ 3750 │ male │ 2007 │
│ Adelie │ Torgersen │ 39.5 │ 17.4 │ 186 │ 3800 │ female │ 2007 │
│ Adelie │ Torgersen │ 40.3 │ 18 │ 195 │ 3250 │ female │ 2007 │
│ Adelie │ Torgersen │ NA │ NA │ NA │ NA │ NA │ 2007 │
│ Adelie │ Torgersen │ 36.7 │ 19.3 │ 193 │ 3450 │ female │ 2007 │
└─────────┴───────────┴────────────────┴───────────────┴───────────────────┴─────────────┴────────┴──────┘
```
### Non-interactive Usage
Execute a query directly and exit:
```sh
databow --driver duckdb --query "SELECT 42 AS the_answer"
```
Execute a query from stdin and exit:
```sh
echo "SELECT 42 AS the_answer" | databow --driver duckdb
```
Execute a query from a file and exit:
```sh
databow --driver duckdb --file select_example.sql
```
Execute a query and output the result to a file:
```sh
databow --driver duckdb --query "SELECT 42 AS the_answer" --output result.json
databow --driver duckdb --query "SELECT 42 AS the_answer" --output result.csv
databow --driver duckdb --query "SELECT 42 AS the_answer" --output result.arrow
```
## Reference
```console
$ databow --help
Query databases via ADBC
Usage: databow [OPTIONS]
Options:
--profile Connection profile name or path
--driver Driver name (required if --profile not specified)
--uri Database uniform resource identifier
--username Database user username
--password Database user password
--option Driver-specific database option
--mode Table display style [default: utf8-compact]
--query Execute query and exit
--file Read and execute file and exit
--output Write result to file
-h, --help Print help
-V, --version Print version
```
## License
This project is licensed under [Apache-2.0](LICENSE).