DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

nancycookprc_184190 avatar image
nancycookprc_184190 asked ·

EXPAND command incorrectly listed as "cqlshExpand"

Hello,

This started off as a question, but turned into what I hope will be a helpful hint to others.

I ran across the cqlshExpand command for the first time today while doing my final round of studying for my Cassandra exam and wanted to try it out. However, I kept getting an error message. As you can see, it isn't even recognized as a cqlsh command and insists that I add on a semi-colon like a regular cql statement.

cqlsh:killrvideo> show version[cqlsh 5.0.1 | Cassandra 4.0.0.2284 | DSE 6.0.0 | CQL spec 3.4.5 | DSE protocol v2]cqlsh:killrvideo> cqlshExpand ON
...;
SyntaxException: line 1:0 no viable alternative at input 'cqlshExpand' ([cqlshExpand]...)

I thought perhaps my versions were out of date and so included them in the output above when I was forming my question. After trying this a dozen different times (even copying from the webpage to make sure I wasn't misspelling the command), I was about to submit my question.

For some reason I decided to try it just using "expand" and it worked!

cqlsh:killrvideo> EXPAND ON
Now Expanded output is enabled

This seems like a handy command to know.

Have a lovely day,

Nancy

EDIT: Actually, I think I just figured it out. The page I had found cqlshExpand on may have been for the non-DataStax version. I just did a little more poking around and discovered https://docs.datastax.com/en/dse/6.8/cql/cql/cql_reference/cqlsh_commands/cqlshExpand.html which I think refers to the DataStax version of cqlsh.

Just fyi - for a newbie this is quite confusing, especially since it's all on the DataStax site. I see that big blue banner on top and think I'm where I can get the best information. I will have to be more careful in the future.

cqlsh
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

@nancycookprc_184190 This was a typo on the OSS Cassandra version of our documents. As you discovered, the correct command is:

cqlsh> EXPAND ON 
Now Expanded output is enabled

Thanks for bringing this to our attention. I will get it fixed ASAP. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.