mit einem Klick
install-datafusion
// Install or update datafusion-cli. Supports installation via cargo install, Homebrew, or pre-built binaries. Checks the current version and offers to upgrade if outdated.
// Install or update datafusion-cli. Supports installation via cargo install, Homebrew, or pre-built binaries. Checks the current version and offers to upgrade if outdated.
| name | install-datafusion |
| description | Install or update datafusion-cli. Supports installation via cargo install, Homebrew, or pre-built binaries. Checks the current version and offers to upgrade if outdated. |
| argument-hint | ["--update"] |
| allowed-tools | Bash |
You are helping the user install or update datafusion-cli.
Arguments: $@
command -v datafusion-cli
If found, check the version:
datafusion-cli --version 2>&1 | head -1
--update is in the arguments and datafusion-cli is installed → update mode--update → report the current version and stopDetect the platform and offer the appropriate method:
Option 1 — Homebrew (recommended if brew is available):
brew install datafusion
Or for update:
brew upgrade datafusion
Option 2 — cargo install (works on all platforms):
cargo install datafusion-cli
Option 1 — cargo install (recommended):
cargo install datafusion-cli
Option 2 — Download pre-built binary from GitHub releases:
LATEST=$(curl -fsSL https://api.github.com/repos/apache/datafusion/releases/latest | grep -oP '"tag_name": "\K[^"]+')
curl -fsSL "https://github.com/apache/datafusion/releases/download/${LATEST}/datafusion-cli-${LATEST}-x86_64-unknown-linux-gnu.tar.gz" | tar xz
sudo mv datafusion-cli /usr/local/bin/
If neither brew nor pre-built binaries are suitable:
cargo install datafusion-cli
For update via cargo:
cargo install datafusion-cli --force
Note: cargo install requires a Rust toolchain. If cargo is not found, suggest installing Rust first via rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
datafusion-cli --version
Report success with the installed version.
Register a data file as a persistent external table in the DataFusion session. Supports Parquet, CSV, JSON, Arrow IPC, and Avro files. Explores the schema and writes to the session state file for reuse across skills.
Search Apache DataFusion documentation, user guide, and API reference. Returns relevant documentation for a question or keyword. Searches the official DataFusion repository and website.
Visualize and analyze DataFusion query execution plans. Shows logical and physical plans, identifies performance bottlenecks, and suggests optimizations. Supports EXPLAIN and EXPLAIN ANALYZE.
Create and manage materialized views using DataFusion. Persist SQL query results as Parquet files for fast repeated access. Track source dependencies and refresh when data changes. Powered by datafusion-cli's COPY TO.
Run SQL queries against registered tables or ad-hoc against files using datafusion-cli. Accepts raw SQL or natural language questions. Supports Parquet, CSV, JSON, and Arrow IPC files.
Read and explore data files (Parquet, CSV, JSON, Arrow IPC, Avro) locally or from S3/GCS. Auto-detects format by extension. Uses datafusion-cli for schema inspection and data preview.