百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

datafusion-dft

> 数据库
开源

包括用于 DataFusion 的 CLI、TUI 和服务器实现。

199 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

包括用于 DataFusion 的 CLI、TUI 和服务器实现。

dft - Batteries included DataFusion

Overview

dft is a batteries-included suite of DataFusion applications that provides:

  • Data Source Integration: Query files from S3, local filesystems, or HuggingFace datasets
  • Table Format Support: Native support for Delta Lake and Vortex
  • Extensibility: UDFs defined in WASM
  • Helper Functions: Built-in functions for JSON and Parquet data processing

The project offers four complementary interfaces:

  1. Text User Interface (TUI): An interactive SQL IDE with real-time query analysis, benchmarking, and catalog exploration (requires tui feature)
  2. Command Line Interface (CLI): A scriptable engine for executing queries from files or command line
  3. FlightSQL Server: A standards-compliant SQL interface for programmatic access (requires flightsql feature)
  4. HTTP Server: A REST API for SQL queries and catalog exploration (requires http feature)

All interfaces share the same execution engine, allowing you to develop locally with the TUI and then seamlessly deploy with the server implementations.

dft builds upon datafusion-cli with enhanced interactivity, additional integrations, and ready-to-use server implementations.

User Guide

Installation

From crates.io (Recommended)

bash
# Core CLI and server interfaces
cargo install datafusion-dft

# With TUI interface
cargo install datafusion-dft --features=tui

# For full functionality with all features (including TUI)
cargo install datafusion-dft --all-features

If you don't have Rust installed, follow the installation instructions.

Feature Flags

Common feature combinations:

…

See the Features documentation for all available features.

Note: The TUI (Text User Interface) is optional and requires the tui feature flag. The CLI, FlightSQL server, and HTTP server are always available.

Running the apps

…

Benchmarking

dft includes built-in benchmarking to measure query performance with detailed timing breakdowns:

bash
# Serial benchmark (default) - measures query performance in isolation
dft -c "SELECT * FROM my_table" --bench

# Concurrent benchmark - measures throughput under load
dft -c "SELECT * FROM my_table" --bench --concurrent

# Custom iteration count
dft -c "SELECT * FROM my_table" --bench -n 100

# Save results to CSV for analysis
dft -c "SELECT * FROM my_table" --bench --save results.csv

# Compare serial vs concurrent performance
dft -c "SELECT * FROM my_table" --bench --save results.csv
dft -c "SELECT * FROM my_table" --bench --concurrent --save results.csv --append

Benchmark Output:

  • Timing breakdown by phase: logical planning, physical planning, execution
  • Statistics: min, max, mean, median for each phase
  • Row counts validation across all runs
  • CSV export with concurrency_mode column for result comparison

Serial vs Concurrent:

  • Serial: Pure query execution time without contention (baseline performance)
  • Concurrent: Throughput measurement with parallel execution (reveals bottlenecks and contention)
  • Concurrent mode uses adaptive concurrency: min(iterations, CPU cores)

Setting Up Tables with DDL

dft can automatically load table definitions at startup, giving you a persistent "database-like" experience.

Using DDL Files

  1. Create a DDL file (default: ~/.config/dft/ddl.sql)
  2. Add your table and view definitions:
sql
-- S3 data source (requires s3 feature)
CREATE EXTERNAL TABLE users 
STORED AS NDJSON 
LOCATION 's3://bucket/users';

-- Parquet files
CREATE EXTERNAL TABLE transactions 
STORED AS PARQUET 
LOCATION 's3://bucket/transactions';

-- Local files
CREATE EXTERNAL TABLE listings 
STORED AS PARQUET 
LOCATION 'file://folder/listings';

-- Create views from tables
CREATE VIEW users_listings AS 
SELECT * FROM users 
LEFT JOIN listings USING (user_id);

-- Delta Lake table (requires deltalake feature)
CREATE EXTERNAL TABLE delta_table 
STORED AS DELTATABLE 
LOCATION 's3://bucket/delta_table';

Loading DDL

  • TUI (requires tui feature): DDL is automatically loaded at startup
  • CLI: Add --run-ddl flag to execute DDL before your query
  • Custom Path: Configure a custom DDL path in your config file
    toml
    [execution]
    ddl_path = "/path/to/my/ddl.sql"

Quick Reference

Feature Documentation
Core Features Features Guide
Database Database Guide
TUI Interface TUI Guide
CLI Usage CLI Guide
FlightSQL Server FlightSQL Guide
HTTP Server HTTP Guide
Configuration Options Config Reference

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustarrowclidatadatabase

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库