Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

While accessing hive tables getting cant find schema error

avatar
Contributor

grunt> A = load 'emp1' Using org.apache.hive.hcatalog.pig.HCatLoader(); 2016-03-04 00:31:02,232 [main] INFO org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is deprecated. Instead, use fs.defaultFS 2016-03-04 00:31:02,411 [main] INFO org.apache.hadoop.hive.metastore.HiveMetaStore - 0: Opening raw store with implemenation class:org.apache.hadoop.hive.metastore.ObjectStore 2016-03-04 00:31:02,413 [main] INFO org.apache.hadoop.hive.metastore.ObjectStore - ObjectStore, initialize called 2016-03-04 00:31:02,417 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2245: Cannot get schema from loadFunc org.apache.hive.hcatalog.pig.HCatLoader Details at logfile: /usr/lib/hive-0.13.1-bin/hcatalog/pig_1457031005634.log

1 ACCEPTED SOLUTION

avatar
Guru

@Gurjinder Singh Make sure you have a table in Hive named 'emp1' in the 'default' database.

View solution in original post

5 REPLIES 5

avatar
Guru

@Gurjinder Singh Make sure you have a table in Hive named 'emp1' in the 'default' database.

avatar
New Contributor

Rich, even if emp1 in default database it would be giving error. I received the same error for below command.

A = Load 'orders_manage1' USING org.apache.hive.hcatalog.pig.HCatLoader();

avatar
Explorer

@Praphul Agarwal @Gurjinder Singh - Here are the steps

1) Add the hive connection property in pig properties - PIG_OPTS=-Dhive.metastore.uris=thrift://localhost:10000

2) restart hiveserver, hivemetastore and pig services

3) create a pig script with the load statement 'using org.apache.hive.hcatalog.pig.HCatLoader();'

4) run the pig script - pig -useHCatalog 'pigscript'

avatar
New Contributor

@vsithannan

"PIG_OPTS=-Dhive.metastore.uris=thrift://localhost:10000 "

This localhost number depends on hive-site.xml or separately we have to defile mine is

<property> <name>hive.metastore.uris</name> <value>thrift://localhost:9083</value> </property>

can you please help me

avatar
New Contributor
log-file.txt

This my log file while i was trying to get data from hive