I am trying to escape characters in python impyla query for Cloudera Impala on Hadoop but nothing seems to work.. The template syntax doesn't escape (Unusual for a database API..)
cursor.execute('SELECT * from table where col1 = %s', tuple(["John's unescaped string"]))
produces an error.
Even
cursor.execute('SELECT * from table where col1 = %s', tuple([json.dumps("John's unescaped string")]))
doesn't work, does anyone have any idea how to provide a solution for this? Is there a better way or a more fully featured Impala library for Python?