Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Apache DataFusion CLI

$ datafusion-cli Foundation Low Risk
Apache Software Foundation · Database & Data · Apache-2.0 · macos / linux / windows

datafusion-cli is the official command-line query engine for Apache DataFusion. Built in Rust on Apache Arrow, it queries local or S3/GCS Parquet, CSV, Avro, and NDJSON files via -c with vectorized execution and --format json / --format nd-json output.

FCRS-1.0 Score
93 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install datafusion
CLI vs MCP Decision CLI Only

Runs vectorized Arrow SQL queries locally or against S3 Parquet with --format json, avoiding loading multi-megabyte data files into agent memory.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Supports -c one-shot execution, -f SQL files, --format json / nd-json / csv, and --quiet mode.

  • Supports -c, --format json, and --format nd-json
Trust & Safety 23 / 25

Read-only SQL queries by default; file writes require explicit COPY ... TO SQL statements.

  • In-process read-only query execution unless COPY is invoked
Setup & Portability 14 / 15

Rust binary available via Homebrew, cargo install datafusion-cli, and Apache/GitHub releases across macOS, Linux, and Windows.

  • Distributed via brew install datafusion and cargo
Utility & Efficiency 14 / 15

Vectorized Arrow SQL engine handles Parquet, CSV, JSON, Avro, and S3/GCS object stores at high speed.

  • Vectorized Arrow engine with S3/GCS and Parquet support
Maintenance & Lineage 10 / 10

Top-level Apache Software Foundation project (apache/datafusion) under Apache-2.0 with very active development.

  • Official ASF apache/datafusion repository
Docs & Verifiability 9 / 10

Comprehensive official CLI user guide and SQL reference on datafusion.apache.org.

  • Official CLI docs at datafusion.apache.org

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key
Credential Storage

None for local files; reads AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_REGION or GOOGLE_APPLICATION_CREDENTIALS env vars for object-store URIs.

Side Effects
Read-Only Local Write
Cost & Quotas

Apache-2.0 open-source CLI; free (remote S3/GCS queries incur cloud egress/request fees).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# datafusion-cli Agent Rules
- Always pass `-c "<sql>"` (or `-f <script.sql>`) and `--format json` / `--format nd-json`; bare `datafusion-cli` enters an interactive REPL.
- Include `LIMIT` on `SELECT` queries and avoid `COPY ... TO` unless file export is requested.

Agent-Ready Command Recipes

Safe Read-Only Queries

Query a Parquet file with JSON output
datafusion-cli --format json -c "SELECT * FROM 'events.parquet' LIMIT 20"

Executes a bounded SQL query over Parquet and emits JSON without entering the REPL.

Inspect inferred schema as NDJSON
datafusion-cli --format nd-json -c "DESCRIBE 'events.parquet'"

Prints column names and Arrow types as newline-delimited JSON.

Strengths for Agents

  • + Blazing-fast vectorized Rust/Arrow SQL execution over Parquet, Avro, CSV, and JSON.
  • + Native --format json and --format nd-json pair cleanly with -c.
  • + Supports s3:// and gs:// object store queries out of the box.

Caveats & Pitfalls

  • ! Running datafusion-cli without -c or -f opens an interactive SQL REPL.
  • ! Memory limits (-m) should be set when querying huge unpartitioned datasets in constrained sandboxes.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI