Skip to main content
Enterprise Support Available
Spice.ai Enterprise provides full support for up to 3 years from the release date.
Version: v1.5

sql

Start an interactive SQL query session against the Spice runtime

Usage

spice sql [flags]

Flags

  • --tls-root-certificate-file The path to the root certificate file used to verify the Spice.ai runtime server certificate
  • -h, --help Print this help message
  • --flight-endpoint Configure runtime Flight endpoint. Defaults to http://127.0.0.1:50051
  • --http-endpoint Configure runtime HTTP endpoint. Defaults to http://127.0.0.1:8090

Examples

$ spice sql
Welcome to the Spice.ai SQL REPL! Type 'help' for help.

show tables; -- list available tables
sql> show tables
+---------------+--------------------+---------------+------------+
| table_catalog | table_schema | table_name | table_type |
+---------------+--------------------+---------------+------------+
| datafusion | public | tmp_view_test | VIEW |
| datafusion | information_schema | tables | VIEW |
| datafusion | information_schema | views | VIEW |
| datafusion | information_schema | columns | VIEW |
| datafusion | information_schema | df_settings | VIEW |
+---------------+--------------------+---------------+------------+

Additional Example

$ spice sql --tls-root-certificate-file /path/to/cert.pem
Welcome to the Spice.ai SQL REPL! Type 'help' for help.

show tables; -- list available tables
sql> show tables
+---------------+--------------------+---------------+------------+
| table_catalog | table_schema | table_name | table_type |
+---------------+--------------------+---------------+------------+
| datafusion | public | tmp_view_test | VIEW |
| datafusion | information_schema | tables | VIEW |
| datafusion | information_schema | views | VIEW |
| datafusion | information_schema | columns | VIEW |
| datafusion | information_schema | df_settings | VIEW |
+---------------+--------------------+---------------+------------+