Update: Newline is working if I insert the same line by python driver script.
session.execute("INSERT INTO ctable" + " (cid, cstring) VALUES (%s, %s)", ('2', 'row1\nrow2'))
Still don't understand why the CQLSH command doesn't work.
Original Question: I am trying to insert a very long string into Cassandra by CQLSH command, and add a '\n' to split the string into two lines when display.
I tried
insert into ctable (cid, cstring ) values('2', 'row1\nrow2');
insert into ctable (cid, cstring ) values('2', 'row1\\nrow2');
insert into ctable (cid, cstring ) values('2', 'row1\r\nrow2');
None of above statements worked, all \n had been treated as a regular chracter. Can anyone help?