Wednesday, January 24, 2018

[RESOLVED] CASSANDRA : line 0:-1 no viable alternative at input ''



Cassandra Query Issue

When querying for data in Cassandra, The following error was thrown in DataStax Studio,

SELECT * FROM XXXXX WHERE name = "xxxxx"
line 0:-1 no viable alternative at input '<EOF>'

Cause of the Issue

It seems the issue is using "" for the String fields.

Fix 

Instead of double quotes (""), using single quotes ('') will resolve the issue.

SELECT * FROM XXXXX WHERE name = 'xxxxx'

Image : https://pixabay.com/en/wires-cables-inputs-outputs-audio-354065/





1 comment: