<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: [main] ERROR org.apache.pig.tools.grunt.Grunt in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/main-ERROR-org-apache-pig-tools-grunt-Grunt/m-p/142648#M56421</link>
    <description>&lt;P&gt;such a compiler !&lt;/P&gt;</description>
    <pubDate>Tue, 07 Mar 2017 22:57:32 GMT</pubDate>
    <dc:creator>drenusha_gjurka</dc:creator>
    <dc:date>2017-03-07T22:57:32Z</dc:date>
    <item>
      <title>[main] ERROR org.apache.pig.tools.grunt.Grunt</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/main-ERROR-org-apache-pig-tools-grunt-Grunt/m-p/142645#M56418</link>
      <description>&lt;P&gt;This is my script and i have also a table called riskfactor in Hive .

a = LOAD 'geolocation' using org.apache.hive.hcatalog.pig.HCatLoader();

b = filter a by event != 'normal';

c = foreach b generate driverid, event, (int) '1' as occurance;

d = group c by driverid;

e = foreach d generate group as driverid, SUM(c.occurance) as t_occ;

g = LOAD 'drivermileage' using org.apache.hive.hcatalog.pig.HCatLoader();

h = join e by driverid, g by driverid;

final_data = foreach h generate $0 as driverid, $1 as events, $3 as totmiles, (float) $3/$1 as riskfactor;
store final_data into 'riskfactor' using org.apache.hive.hcatalog.pig.HCatStorer();

When i execute this pig script it shows me that error and not saving any data.

I did step by step everything it says here :
&lt;A href="https://hortonworks.com/hadoop-tutorial/hello-world-an-introduction-to-hadoop-hcatalog-hive-and-pig/#section_5" target="_blank"&gt;https://hortonworks.com/hadoop-tutorial/hello-world-an-introduction-to-hadoop-hcatalog-hive-and-pig/#section_5&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 21:20:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/main-ERROR-org-apache-pig-tools-grunt-Grunt/m-p/142645#M56418</guid>
      <dc:creator>drenusha_gjurka</dc:creator>
      <dc:date>2017-03-07T21:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: [main] ERROR org.apache.pig.tools.grunt.Grunt</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/main-ERROR-org-apache-pig-tools-grunt-Grunt/m-p/142646#M56419</link>
      <description>&lt;P&gt;hello &lt;A rel="user" href="https://community.cloudera.com/users/16415/drenushagjurka.html" nodeid="16415"&gt;@voca voca&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;I ran into the same problem but realized that the totalmiles column within Hive should be a Double Column and not an INT as described in the tutorial.&lt;/P&gt;&lt;P&gt;So if you take this block of code below and rerun in hive view.  It should work for you.&lt;/P&gt;&lt;PRE&gt;drop table riskfactor; 
CREATE TABLE riskfactor (driverid string,events bigint,totmiles double,riskfactor float)
STORED AS ORC;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Mar 2017 22:30:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/main-ERROR-org-apache-pig-tools-grunt-Grunt/m-p/142646#M56419</guid>
      <dc:creator>drice1</dc:creator>
      <dc:date>2017-03-07T22:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: [main] ERROR org.apache.pig.tools.grunt.Grunt</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/main-ERROR-org-apache-pig-tools-grunt-Grunt/m-p/142647#M56420</link>
      <description>&lt;P&gt;Once you recreate the hive table try to rerun your Pig script.  Inside the pig script don't forget to add the argument -useHCatalog..... &lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 22:32:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/main-ERROR-org-apache-pig-tools-grunt-Grunt/m-p/142647#M56420</guid>
      <dc:creator>drice1</dc:creator>
      <dc:date>2017-03-07T22:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: [main] ERROR org.apache.pig.tools.grunt.Grunt</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/main-ERROR-org-apache-pig-tools-grunt-Grunt/m-p/142648#M56421</link>
      <description>&lt;P&gt;such a compiler !&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 22:57:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/main-ERROR-org-apache-pig-tools-grunt-Grunt/m-p/142648#M56421</guid>
      <dc:creator>drenusha_gjurka</dc:creator>
      <dc:date>2017-03-07T22:57:32Z</dc:date>
    </item>
  </channel>
</rss>

