Unable to execute hive queries using HiveContext

Hi Team,

I am facing problem while executing hive queries using HiveContext.

Please find the below error.Please help.

Caused by: MetaException(message:org.apache.hadoop.security.AccessControlException: Permission denied: user=bdantuluri9, access=EXECUTE, inode="/user/amanpreetbhatia/retail_db/orders":amanpreetbhatia:hdfs:drwx------

@Bharath_D - Please post the query what you are trying.

I am trying to execute the following then it’s throws an error

from pyspark.sql import HiveContext
sqlContext = HiveContext(sc)
sqlContext.sql(“set spark.sql.shuffle.partitions=10”);

joinAggData = sqlContext.sql(“select o.order_date, round(sum(oi.order_item_subtotal), 2),
count(distinct o.order_id) from orders o join order_items oi
on o.order_id = oi.order_item_order_id
group by o.order_date order by o.order_date”)

If the order and order_items tables are in Hive under any database created by you, then you need to suffix the database name for tables like xyz.orders and xyz.order_items in the query.

Thank a lot.It’s working now