Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration Reference

cqlsh-rs reads configuration from ~/.cassandra/cqlshrc by default. Override the path with --cqlshrc.

This is the same INI-format configuration file used by the Python cqlsh. All sections and keys are fully compatible.

File format

The cqlshrc file uses standard INI format:

[section]
key = value

Example cqlshrc

[authentication]
username = cassandra
password = cassandra

[connection]
hostname = 127.0.0.1
port = 9042
connect_timeout = 5
request_timeout = 10

[ssl]
certfile = /path/to/ca-cert.pem
validate = true

[ui]
color = on
datetimeformat = %Y-%m-%d %H:%M:%S%z
float_precision = 5
encoding = utf-8

[csv]
field_size_limit = 131072

[copy]
numprocesses = 4
maxattempts = 5

[copy-to]
pagesize = 1000
pagetimeout = 10

[copy-from]
chunksize = 1000
ingestrate = 100000

[tracing]
max_trace_wait = 10.0

Sections

SectionDescription
[authentication]Username, password, credentials file
[connection]Host, port, timeouts
[ssl]SSL/TLS certificates and validation
[ui]Display settings (color, formats, encoding)
[cql]CQL version
[csv]CSV field size limits
[copy] / [copy-to] / [copy-from]COPY command defaults
[tracing]Tracing wait times

Precedence

Configuration values are resolved in this order (highest priority first):

  1. CLI flags
  2. Environment variables
  3. cqlshrc file values
  4. Built-in defaults