Connect to DSE with cqlsh
To use the command line tool cqlsh
to connect to DSE and test any feature such as vector search, you must be using the correct version.
There are three possibilities to obtain the correct vector-search-ready version:
-
Download
cqlsh
from the DataStax Downloads page and select the DSE 6.9.0 version. -
Use the version bundled with the tarball.
-
Use the version bundled with the DSE Docker container; it can be executed inside the running container.
Prerequisites
-
Python 3.6+
DataStax CQLSH License Terms. By downloading this DataStax product, you agree to the terms of the EULA. |
Standalone cqlsh
-
On the DataStax Download page, choose a compatible version, and if you agree with the license terms, select the CQLSH Terms checkbox.
-
Then click Download to download the tool.
DataStax CQLSH License Terms. By downloading this DataStax product, you agree to the terms of the EULA. |
-
Once the file is downloaded, unpack (unzip) the distribution using the following command-line command:
tar -xzvf cqlsh-6.8.tar.gz
The files are extracted in the current directory, so be sure to change to the appropriate directory before running the tar
command.
cqlsh
in the tarball
If you have installed DSE from the tarball, you can find the cqlsh
script in the bin
directory of the DSE installation directory.
cqlsh
in the Docker container
If you are using the DSE Docker container, you can run the cqlsh
script inside the container in the bin
directory of the DSE installation directory.
Connect to DSE with cqlsh
Connect with the command-line client cqlsh
, making sure to use a newer version with built-in vector type support (either the one bundled in the Docker container or in the tarball).
If cqlsh
starts properly, version numbers and the cqlsh
command prompt will appear.
bin/cqlsh
Result
Connected to Test Cluster at 127.0.0.1:9042
Connected to dse-6.9.0-early-preview-cluster at 127.0.0.1:9042.
[cqlsh 6.8.0 | DSE 6.9.0-early-preview | CQL spec 3.4.5 | DSE protocol v2]
Use HELP for help.
cqlsh>
If |
See Use and configure cqlsh if you need to connect remotely to a DSE cluster.