Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

SemanticException at beeline when NULL

Solved Go to solution
Highlighted

SemanticException at beeline when NULL

Contributor

Hi

When i do a SELECT null; at cli hive i get a good answer -> NULL

when i do this in beeline , i get

Error: Error while compiling statement: FAILED: SemanticException [Error 10004]: Line 1:7 Invalid table alias or column reference 'null': (possible column names are: ) (state=42000,code=10004)

this is working on one of my clusters but not in one of them

(hdp 2.6.1

Connected to: Apache Hive (version 2.1.0.2.6.1.0-129)
Driver: Hive JDBC (version 1.2.1000.2.6.1.0-129)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 1.2.1000.2.6.1.0-129 by Apache Hive

)

i need this to work, since when i query

INSERT OVERWRITE TABLE schema.customer
SELECT CUST_ACCOUNTS
otherschema.CUST_ACCOUNT_ID,
NULL AS ACCOUNT
FROM xxxx ;


i really appreciate any help



1 ACCEPTED SOLUTION

Accepted Solutions

Re: SemanticException at beeline when NULL

Contributor

the fix is to set this: `set hive.support.sql11.reserved.keywords=true;`

1 REPLY 1

Re: SemanticException at beeline when NULL

Contributor

the fix is to set this: `set hive.support.sql11.reserved.keywords=true;`