EOF Batch error

805 views Asked by At

Impossible to run a batch alter table in cqlsh.

cqlsh:test> create table mytable (id int PRIMARY KEY, comment text);
cqlsh:test> begin batch alter table mytable add testcol text; apply batch;
SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:50 missing EOF at 'apply' (... mytable add testcol text; [apply] batch...)">

Each time I try to make a batch, I've the same EOF error, on different systems.

1

There are 1 answers

0
JosefZ On

According to information in CQL for Cassandra docs, ALTER TABLE statement is not allowed:

A BATCH statement combines multiple data modification language (DML) statements (INSERT, UPDATE, DELETE) into a single logical operation...