databow:一个使用 ADBC 驱动查询任意数据库的 Rust 命令行工具
databow: a Rust CLI to query any database with an ADBC driver

原始链接: https://columnar.tech/blog/introducing-databow//

**databow** 是一款全新的开源命令行工具,旨在统一数据库交互体验。它采用 Rust 语言编写,具备高效与高速的特性,为所有支持 ADBC(Arrow 数据库连接)驱动的数据库提供了一套单一且一致的查询接口。 通过利用 Apache Arrow 生态系统,databow 消除了用户在语法和特性各异的多种碎片化命令行工具(如 `psql` 或 `snowsql`)之间来回切换的烦恼。无论是处理事务型、分析型、湖仓一体还是时序数据库,databow 都能提供标准化的使用体验。 **主要功能包括:** * **统一接口:** 使用单一工具即可连接 30 多种数据库(如 PostgreSQL、Snowflake、DuckDB、BigQuery)。 * **现代 REPL:** 内置语法高亮、多行输入以及简洁、对齐的输出显示。 * **灵活使用:** 既适合交互式 Shell 使用,也适用于脚本和自动化流程。 * **高效导出:** 支持将查询结果直接导出为 CSV、JSON 和 Arrow 等格式。 * **简化配置:** 通过将数据库连接信息保存为配置文件,简化连接过程。 您可以通过 `uv tool install databow` 或 `cargo install databow` 安装 databow。如需了解更多信息并查看不断扩展的支持驱动列表,请访问项目文档。

Hacker News最新 | 往期 | 评论 | 提问 | 展示 | 招聘 | 提交登录databow: 一款使用 ADBC 驱动程序查询任何数据库的 Rust 命令行工具 (columnar.tech)11 分,hckshr 发布于 1 小时前 | 隐藏 | 往期 | 收藏 | 讨论 帮助 准则 | 常见问题 | 列表 | API | 安全 | 法律 | 加入 YC | 联系 搜索:
相关文章

原文

TL;DR

databow is a new open source command-line tool for querying any database that has an ADBC driver. Built in Rust, databow gives you one fast, modern interface to the SQL systems across your entire data stack. Install it with uv tool install databow.

In a typical day, a data engineer might query a local embedded database, a distributed cloud data warehouse, and an enterprise relational database server—each with its own CLI. psql, mysql, snowsql, bq, sqlite3: different flags, different output formats, different quirks. Switching between them means relearning syntax and reformatting results. GUI tools exist, but they’re heavyweight and pull you out of the terminal.

What if one fast, modern CLI could connect to any database?

Meet databow

Today, we’re excited to introduce databow—an open source command-line tool for querying databases with ADBC (Arrow Database Connectivity).

databow is built in Rust for fast queries and a small footprint. It connects to any database that has an ADBC driver, giving you one unified interface for the SQL systems across your entire data stack.

What databow can do

Connect to 30+ databases

databow works with any database that has an ADBC driver. That includes:

  • Transactional databases: PostgreSQL, MySQL, MariaDB, SQLite, Oracle Database, Microsoft SQL Server, CockroachDB, YugabyteDB, TiDB
  • Analytical databases: DuckDB, ClickHouse, Snowflake, BigQuery, Databricks, Amazon Redshift, Teradata
  • Lakehouse engines: Trino, Dremio, StarRocks, Apache Doris
  • Time-series databases: InfluxDB, TimescaleDB, GreptimeDB

The list keeps growing as the ADBC ecosystem expands.

Run queries in an interactive SQL shell

databow provides a modern REPL with the features you’d expect:

$ databow --driver duckdb
> SELECT * FROM 'sales.parquet' LIMIT 5;
┌────────────┬─────────┬──────────┐
│ date       │ product │ revenue  │
├────────────┼─────────┼──────────┤
│ 2026-01-15 │ Widget  │ 1250.00  │
│ 2026-01-15 │ Gadget  │ 890.50   │
│ 2026-01-16 │ Widget  │ 1100.00  │
│ 2026-01-16 │ Gizmo   │ 2340.00  │
│ 2026-01-17 │ Gadget  │ 756.25   │
└────────────┴─────────┴──────────┘
  • Syntax highlighting with automatic light/dark theme detection
  • Multiline SQL input for complex queries
  • Clean, aligned tables with dynamic column widths
  • Command history for navigating previous queries

Export your results

Need to share your query results? Export directly to the format you need:


databow --driver postgresql --uri "postgres://localhost/analytics" \
  --query "SELECT * FROM monthly_report" \
  --output report.csv


databow --profile warehouse --query "SELECT * FROM users" \
  --output users.json


databow --profile prod-db --query "SELECT * FROM events" \
  --output events.arrow

Power your automations

databow isn’t just for interactive use. It’s designed to fit into scripts and pipelines:


databow --driver duckdb --uri warehouse.db --query "SELECT count(*) FROM logs WHERE level = 'ERROR'"


databow --driver postgresql --uri "postgres://localhost/analytics" \
  --file daily_metrics.sql --output metrics.csv


echo "SELECT version()" | databow --driver postgresql --uri "$DATABASE_URL"

Load connection details from profiles

Tired of typing long database connection strings? Save your configurations in ADBC connection profiles and refer to them by name:


databow --profile production-warehouse --query "SELECT * FROM orders"

Why ADBC

databow is built on ADBC—the Arrow Database Connectivity standard from the Apache Arrow project. ADBC provides a vendor-neutral API for database access, similar to what JDBC and ODBC do for legacy connectivity. But ADBC is designed from the ground up to transfer data in the Apache Arrow format. That means:

  • Efficient data transfer: Results come back in Arrow’s columnar format, and when the database speaks Arrow natively, that means no row-by-row serialization overhead at all.
  • Consistent behavior: The same API works across databases.
  • Growing ecosystem: As more databases add ADBC drivers, databow automatically supports them.

By building on ADBC, databow benefits from the work of the entire Arrow community. When a new database releases an ADBC driver, databow users get access immediately.

Get started

databow ships as a single binary. Install it with uv or Cargo:


uv tool install databow


cargo install databow

Then install the ADBC driver for your database using dbc, the command-line tool for installing and managing ADBC drivers. For example, to install the ADBC driver for DuckDB:

dbc install duckdb

Then start querying:

databow --driver duckdb

Roadmap

We’re actively working on new features to make databow even more powerful:

  • Dot commands: Interactive commands for quick configuration and exploration
  • More export formats: Support for writing results to Parquet and other file types
  • Result set truncation: Configurable limits for large result sets to keep your terminal responsive
  • Data type display: Show column data types alongside query results for better schema visibility
联系我们 contact @ memedata.com