I'm trying to execute a simple cql query in python and I keep getting an error.
table1 = "mytable1"
table2 = "mytable2"
query1 = "SELECT * FROM %s"
table1Rows = session.execute(query1, (table1,))
table2Rows = session.execute(query1, (table2,))
The table variables are actually passed in as arguments but I just made my own as an example. I get this error:
cassandra.protocol.SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:14 no viable alternative at input 'mytable1' (SELECT * FROM ['mytable]...)">
I can't figure out what's wrong with my syntax. Please help. Thanks!