Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - "create table as" fails with error


Copy link to this message
-
"create table as" fails with error
"Subramanian, Sanjay 2014-04-21, 20:35
Hey guys

THIS QUERY FAILS

create table olena.temp8 as select * from olena.temp7 group by person_id, level, technical, business, liberalarts, lifesciences, other, school_name, degree_complete_flag

FAILED: Error in metadata: InvalidObjectException(message:temp8 is not a valid object name)

14/04/21 12:02:32 ERROR exec.Task: FAILED: Error in metadata: InvalidObjectException(message:temp8 is not a valid object name)

org.apache.hadoop.hive.ql.metadata.HiveException: InvalidObjectException(message:temp8 is not a valid object name)

        at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:582)

        at org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:3719)

        at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:254)

        at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:138)

        at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:66)

        at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1383)

        at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1169)

        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:982)

        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:902)

        at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)

        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)

        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:412)

        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:347)

        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:706)

        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:613)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.hadoop.util.RunJar.main(RunJar.java:208)

Caused by: InvalidObjectException(message:temp8 is not a valid object name)

        at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$create_table_result$create_table_resultStandardScheme.read(ThriftHiveMetastore.java:20140)

        at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$create_table_result$create_table_resultStandardScheme.read(ThriftHiveMetastore.java:20117)

        at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$create_table_result.read(ThriftHiveMetastore.java:20043)

        at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)

        at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_create_table(ThriftHiveMetastore.java:732)

        at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.create_table(ThriftHiveMetastore.java:719)

        at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:432)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:89)

        at $Proxy9.createTable(Unknown Source)

        at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:576)

        ... 19 more

THIS QUERY SUCCEEDS (Removed “CREATE TABLE”)

select person_id, level, technical, business, liberalarts, lifesciences, other, school_name, degree_complete_flag from olena.temp7 group by person_id, level, technical, business, liberalarts, lifesciences, other, school_name, degree_complete_flag

THIS QUERY SUCCEEDS (Instead of select * , I did select col1,col2,col3…)

create table olena.temp9ish as select person_id, level, technical, business, liberalarts, lifesciences, other, school_name, degree_complete_flag from olena.temp7 group by person_id, level, technical, business, liberalarts, lifesciences, other, school_name, degree_complete_flag

Thanks
Warm Regards

Sanjay