How to load a schema file in Cassandra cqlsh

I have a schema file for Cassandra. I am using a Windows 7 machine (Cassandra on this machine is also 1 node). I want to load the cqssh schema. Until now, I could not find how to do this. I was hoping to transfer the file to cqlsh : cqlsh mySchemaFile. However, since I run on windows to run cqlsh, I do the following

python "C:\Program Files (x86)\DataStax Community\apache-cassandra\bin\cqlsh" localhost 9160

Despite the fact that I have csqsh in my path, when calling this type from python, it needs the full path.

I tried adding the file name there, but so far no luck. Is it possible?

+5
source share
1 answer

cqlsh accepts the file for execution via the -for parameter --file, and not as a positional argument (for example, host and port), therefore the correct form is:

python "C:\Program Files (x86)\DataStax Community\apache-cassandra\bin\cqlsh" localhost 9160 -f mySchemaFile

. 100% , -f \f Windows.

+7

All Articles