'cannot recognize input near '>' ',' 'COUNT' in selection target Command exiting with ret '64'
I am trying to execute the query below:
INSERT OVERWRITE DIRECTORY '${OUTPUT}/os_requests/' SELECT OS, ‘—>’, COUNT(*) FROM cloudfront_logs WHERE DateLog BETWEEN '2014-07-05' AND '2014-08-05' GROUP BY OS;
But i am getting this error:
FAILED: ParseException line 3:104 cannot recognize input near '>' ',' 'COUNT' in selection target Command exiting with ret '64'
returned every time that looks like this. I have the file saved as a .q file.
Solution 1:[1]
Pls use single quote ('). Below SQL will work. Your sql has back quote(‘) which wont work in sql.
INSERT OVERWRITE DIRECTORY '${OUTPUT}/os_requests/' SELECT OS, '—>', COUNT(*) FROM cloudfront_logs WHERE DateLog BETWEEN '2014-07-05' AND '2014-08-05' GROUP BY OS;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Koushik Roy |

