how to load schema file into Cassandra with cqlsh

后端 未结 1 643
半阙折子戏
半阙折子戏 2021-02-10 02:20

I have a schema file for Cassandra. I\'m using a windows 7 machine (Cassandra on this machien as well - 1 node). I want to load the schema with cqssh. So far I have not been abl

1条回答
  •  甜味超标
    2021-02-10 02:39

    cqlsh takes a file to execute via the -f or --file option, not as a positional argument (like the host and port), so the correct form would be:

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

    Note: I'm not 100% sure about whether you'd use -f or \f in Windows.

    0 讨论(0)
提交回复
热议问题