Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

SemanticException at beeline when NULL

avatar
Rising Star

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

avatar
Rising Star

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

View solution in original post

1 REPLY 1

avatar
Rising Star

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