Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

Hi Can anyone help me out to solve this following issue in Hcatlog while storing pig relation into hive

New Contributor

ads = LOAD '/data/hload.txt' as nb; B = FOREACH ads generate nb as (sid: int,sname:chararray,country:chararray,imp:int); store B into 'default.sample11' using org.apache.hive.hcatalog.pig.HCatStorer();

error I got

2018-06-01 02:45:28,346 [main] ERROR org.apache.pig.tools.grunt.Grunt - java.lang.NoSuchFieldError: DECIMAL at org.apache.hive.hcatalog.data.schema.HCatFieldSchema$Type.<clinit>(HCatFieldSchema.java:52) at org.apache.hive.hcatalog.pig.HCatBaseStorer.<clinit>(HCatBaseStorer.java:69) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:266) at org.apache.pig.impl.PigContext.resolveClassName(PigContext.java:505) at org.apache.pig.parser.LogicalPlanBuilder.validateFuncSpec(LogicalPlanBuilder.java:1206) at org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:1194) at org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4766) at org.apache.pig.parser.LogicalPlanGenerator.store_clause(LogicalPlanGenerator.java:7236) at org.apache.pig.parser.LogicalPlanGenerator.op_clause(LogicalPlanGenerator.java:1359) at org.apache.pig.parser.LogicalPlanGenerator.general_statement(LogicalPlanGenerator.java:799) at org.apache.pig.parser.LogicalPlanGenerator.statement(LogicalPlanGenerator.java:517) at org.apache.pig.parser.LogicalPlanGenerator.query(LogicalPlanGenerator.java:392) at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:184) at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1599) at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1546) at org.apache.pig.PigServer.registerQuery(PigServer.java:516) at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:991) at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:412) at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:194) at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:170) at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84) at org.apache.pig.Main.run(Main.java:604) at org.apache.pig.Main.main(Main.java:157) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.hadoop.util.RunJar.main(RunJar.java:160)

1 REPLY 1

Hey @Mahender T!
I'm not a specialist on Pig, but it seems that you're having some issues to match the fields from your pig relation B against the hive table.
Could you check your default.sample11?
See if there's any DECIMAL type in the table.
Hope this helps! 🙂