Error while create hive table using pyspark

Hi, am getting below error while trying to create table in hive using pyspark. But when I checked hive database I can see the table being created

Thanks,
Sandeep

@Sandeep_Harsha - I am able to see departments_test table already present. You are able to resolve it ?

The table is getting created and I can see the data but don’t know why the error came. I want to understand why the error came is it because of the script that I wrote or environmental issue

@Sandeep_Harsha - Don’t need to assign another variable when create table.

sqlContext.sql(" create table saharsha_test.departments_test as select department_id,department_name from saharsha_test.departments")

depts=sqlContext.sql(“select * from saharsha_test.departments_test”

for i in depts.collect():
print i

ok thanks for clarifying:+1: