Treasure Data / Presto: When an SQL query contains trailing ";" at the end, it failed to re-import

Suppose you enter an SQL that contains trailing “;” at the end of the SQL query.

select * from runtime.tasks;

Then this fails when you import, update, or re-import the data.

Error: Error in stop.with.error.message(content) : 
  Query 20220427_053426_00087_hbdxn failed: line 1:28: mismatched input ';'. Expecting: ',', '.', 'AS', 'CROSS', 'EXCEPT', 'FULL', 'GROUP', 'HAVING', 'INNER', 'INTERSECT', 'JOIN', 'LEFT', 'LIMIT', 'NATURAL', 'ORDER', 'RIGHT', 'TABLESAMPLE', 'UNION', 'WHERE', <EOF>, <identifier>

To work around it, remove the trailing “;” from the SQL query like the below example.

select * from runtime.tasks
1 Like