www.HadoopExam.com

HadoopExam Learning Resources

CCD-410 Certifcation CCA-500 Hadoop Administrator Exam HBase Certifcation CCB-400 Data Science Certifcation Hadoop Training with Hands On Lab Hadoop Package Deal

No valid privileges when using a cast on Hive

I'm getting a weird error when running any query with a `cast` as a non-admin on hive. For example:
 
    select cast(site_id as decimal) from test_table limit 5;
 
In that example, `site_id` is a `bigint`, but the column type and the type it's being cast as make no difference at all. The query runs fine in the absence of a `cast`, and the admin can run the query without issues as well. 
 
This is cdh 4.5.0, Hive 0.10.0.
 
Any ideas? Known issue? I found plenty of problems related to the error message, but none seem to apply to my particular situation

Are you using Sentry? If so, you will need to ask your admin to whitelist the cast function for use in queries. This was a known issue  in old versions, fixed via https://issues.apache.org/jira/browse/SENTRY-118 in CDH4.6.0 and above (for the CDH4 line, soon to reach EOL) and CDH 5.1.0 and above (for CDH5). 

Add comment


Security code
Refresh

You are here: Home Question & Answer Hadoop Questions No valid privileges when using a cast on Hive