DataFusion is an extensible query execution framework, written in Rust, that uses Apache Arrow as its in-memory format.
The DataFusion CLI allows SQL queries to be executed by an in-process DataFusion context.
```ignore USAGE: datafusion-cli [OPTIONS]
OPTIONS:
-c, --batch-size
Create a CSV file to query.
bash,ignore
$ echo "1,2" > data.csv
```sql,ignore $ datafusion-cli
DataFusion CLI v8.0.0
CREATE EXTERNAL TABLE foo (a INT, b INT) STORED AS CSV LOCATION 'data.csv'; 0 rows in set. Query took 0.001 seconds.
SELECT * FROM foo; +---+---+ | a | b | +---+---+ | 1 | 2 | +---+---+ 1 row in set. Query took 0.017 seconds. ```
Build the datafusion-cli
.
bash
cd arrow-datafusion/datafusion-cli
cargo build