Hive Error: Error while compiling statement: FAILED: ParseException line 1:7 Failed to recognize

Execute hive SQL statement“   The error of “select out from XXX” is as follows:

Error: Error while compiling statement: FAILED: ParseException line 1:7 Failed to recognize predicate ‘out’. Failed rule: ‘identifier’ in table or column identifier (state=42000,code=40000)

My intention is to take out the value of the out field in my table. The bug in this sentence means that out is a reserved word. Although a column in my table is also called out, it can’t directly execute the select out field. It is modified as follows:
select  ` out`   from XXX

That is to say, put counter quotation marks on both sides of out to solve the problem~

Similar Posts: