Output Formats
The SQLStream CLI supports multiple output formats to suit different needs, from human-readable tables to machine-parsable JSON.
Specifying Output Format
Use the --format option with the query command.
Supported Formats
Table (Default)
Displays results in a formatted ASCII table using the rich library. Best for human inspection.
Output:
CSV
Outputs standard Comma-Separated Values. Useful for piping to other tools or saving to files.
Output:
JSON
Outputs a JSON array of objects. Ideal for web applications or processing with jq.
Output:
Markdown
Outputs a Markdown-formatted table. Great for generating documentation.
Output:
Interactive Shell Export
In the interactive shell (sqlstream shell), you can export results using Ctrl+X. This automatically exports the current result set to CSV, JSON, and Parquet (if available) simultaneously, saving them with a timestamped filename.