astra db cqlsh
astra db cqlsh [-qV] [--no-input] [--[no-]spinner] [--color[=WHEN]] [--dump-logs
[=FILE]] [-h[=all]] [-o=FORMAT] [COMMAND]
Connect to your Astra database using cqlsh
Options
Common Options
-h,--help-
Show this help message and exit.
-o,--output-
One of: human, json, csv
-V,--verbose-
Enable verbose logging output
-q,--quiet-
Only output essential information
--spinner-
Enable/disable loading spinners
--no-input-
Don’t ask for user input (e.g. confirmation prompts)
--color-
One of: auto, never, always
--dump-logs-
Write all logs to an optionally specified file
Examples
# Launch cqlsh for a database
$ astra db cqlsh start my_db
# Launch cqlsh with a specific keyspace
$ astra db cqlsh start my_db -k my_keyspace
# Execute a CQL statement
$ astra db cqlsh exec my_db -e "SELECT * FROM my_keyspace.my_table"
# Execute a CQL file
$ astra db cqlsh exec my_db -f script.cql