# Usage See the current usage using `datafusion-cli --help`: ```bash Apache Arrow Command Line Client for DataFusion query engine. USAGE: datafusion-cli [OPTIONS] OPTIONS: -b, --batch-size The batch size of each query, or use DataFusion default -c, --command ... Execute the given command string(s), then exit --color Enables console syntax highlighting -f, --file ... Execute commands from file(s), then exit --format [default: table] [possible values: csv, tsv, table, json, nd-json] -h, --help Print help information -m, --memory-limit The memory pool limitation (e.g. '10g'), default to None (no limit) --maxrows The max number of rows to display for 'Table' format [possible values: numbers(0/10/...), inf(no limit)] [default: 40] --mem-pool-type Specify the memory pool type 'greedy' or 'fair', default to 'greedy' --top-memory-consumers The number of top memory consumers to display when query fails due to memory exhaustion. To disable memory consumer tracking, set this value to 0 [default: 3] -d, --disk-limit Available disk space for spilling queries (e.g. '10g'), default to None (uses DataFusion's default value of '100g') -p, --data-path Path to your data, default to current directory -q, --quiet Reduce printing other than the results and work quietly -r, --rc ... Run the provided files on startup instead of ~/.datafusionrc -V, --version Print version information ``` ## Commands Available commands inside DataFusion CLI are: - Quit ```bash > \q ``` - Help ```bash > \? ``` - ListTables ```bash > \d ``` - DescribeTable ```bash > \d table_name ``` - QuietMode ```bash > \quiet [true|false] ``` - list function ```bash > \h ``` - Search and describe function ```bash > \h function ``` ## Supported SQL In addition to the normal [SQL supported in DataFusion], `datafusion-cli` also supports additional statements and commands: [sql supported in datafusion]: ../sql/index.rst ### `SHOW ALL [VERBOSE]` Show configuration options ```sql > show all; +-------------------------------------------------+---------+ | name | value | +-------------------------------------------------+---------+ | datafusion.execution.batch_size | 8192 | | datafusion.execution.coalesce_batches | true | | datafusion.execution.time_zone | UTC | | datafusion.explain.logical_plan_only | false | | datafusion.explain.physical_plan_only | false | | datafusion.optimizer.filter_null_join_keys | false | | datafusion.optimizer.skip_failed_rules | true | +-------------------------------------------------+---------+ ``` ### `SHOW