Connect to HCD with cqlsh
To use the command line tool cqlsh
to connect to HCD 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 DataStax HCD 1.0.0 (early preview) version. -
Use the version bundled with the tarball.
-
Use the version bundled with the HCD 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 HCD from the tarball, you can find the cqlsh
script in the bin
directory of the HCD installation directory.
cqlsh
in the Docker container
If you are using the HCD Docker container, you can run the cqlsh
script inside the container in the bin
directory of the HCD installation directory.
Connect to HCD 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
[cqlsh 6.2.0 | Cassandra 5.0 | CQL spec 3.4.7 | Native protocol v5]
Use HELP for help.
cqlsh>
If |
See Use and configure cqlsh if you need to connect remotely to a HCD cluster.