1.3 KiB
1.3 KiB
Cassandra RAG Database
The Cassandra database used by dynamixs.ai is created automatically during startup. This includes the Cassandra keyspace as also the data base schema. Aside from that, the Cassandra cluster can also be managed through the Command Line Console (CLI).
Using the Cassandra CLI
To connect to your cluster you can use the cqlsh tool. To run cqlsh from your started docker environment run:
$ docker exec -it cassandra cqlsh
Connected to dynamixsAiCluster at 127.0.0.1:9042
[cqlsh 6.2.0 | Cassandra 5.0.4 | CQL spec 3.4.7 | Native protocol v5]
Use HELP for help.
cqlsh>
CQL Examples
The following section contains some basic cqlsh commands. For full description see the Cassandra CQL refernce.
show key spaces:
Show all available keyspaces:
cqlsh> DESC KEYSPACES;
Switch to Keysapce:
Select a keyspace be name to interact with this keyspace:
cqlsh> use embeddings;
Show tables in a keyspace:
Show tables schemas in current keyspace:
cqlsh:embeddings> DESC TABLES;
Drop Keyspace:
Drop the keyspace:
DROP KEYSPACE IF EXISTS <keyspace_name>;
Create a dev keyspace with cqlsh
cqlsh> CREATE KEYSPACE <keyspace_name> WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};