<?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: Field with empty or no data causing error in pig in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Field-with-empty-or-no-data-causing-error-in-pig/m-p/101253#M13967</link>
    <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/168/bleonhardi.html"&gt;@Benjamin Leonhardi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I used dump after illustrate.So i got error.So the problem is with " illustrate " command.&lt;/P&gt;&lt;P&gt;Actually i have a habit to use illustrate for every pig command i used in grunt shell to check the output.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jan 2016 21:53:24 GMT</pubDate>
    <dc:creator>bsuresh</dc:creator>
    <dc:date>2016-01-04T21:53:24Z</dc:date>
    <item>
      <title>Field with empty or no data causing error in pig</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Field-with-empty-or-no-data-causing-error-in-pig/m-p/101251#M13965</link>
      <description>&lt;P&gt;Apache Pig version 0.12.1.2.1.7.0-784&lt;/P&gt;&lt;P&gt;I have data where one of the field doesn't have data like &lt;/P&gt;&lt;PRE&gt;2015,,08
2015,,09
2015,,11
2015,,04
2015,,05&lt;/PRE&gt;&lt;P&gt;Now i run the pig command like &lt;/P&gt;&lt;PRE&gt;grunt&amp;gt; given_input = load '/pigtest/flightdelays/' using PigStorage(',') as (year,month,day);
grunt&amp;gt; ori = foreach given_input generate month;
grunt&amp;gt; illustrate ori;

generating error like :  Caused by: java.lang.RuntimeException: No (valid) input data found!&lt;/PRE&gt;&lt;P&gt;when i replace the loader with CSVExcelStorage like&lt;/P&gt;&lt;PRE&gt;grunt&amp;gt; given_input = load '/pigtest/flightdelays/' using org.apache.pig.piggybank.storage.CSVExcelStorage(',') as (year,month,day);
grunt&amp;gt; ori = foreach given_input generate month;
grunt&amp;gt; illustrate ori;&lt;/PRE&gt;&lt;P&gt;getting output like&lt;/P&gt;&lt;PRE&gt;-------------------------------------------------------------------------------
| given_input     | year:bytearray    | month:bytearray    | day:bytearray    |
-------------------------------------------------------------------------------
|                 | 2015              |                    | 05               |
-------------------------------------------------------------------------------
--------------------------------
| ori     | month:bytearray    |
--------------------------------
|         |                    |
--------------------------------&lt;/PRE&gt;&lt;P&gt;So,I would like to know &lt;/P&gt;&lt;P&gt;1)What is the problem with Pigstorage.&lt;/P&gt;&lt;P&gt;2)Is it loader problem or pig version problem.&lt;/P&gt;&lt;P&gt;3)If i want to use PigStoarage in this,How is should???&lt;/P&gt;&lt;P&gt;  Not only illustrate even dump behaves the same.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 16:56:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Field-with-empty-or-no-data-causing-error-in-pig/m-p/101251#M13965</guid>
      <dc:creator>bsuresh</dc:creator>
      <dc:date>2016-01-04T16:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Field with empty or no data causing error in pig</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Field-with-empty-or-no-data-causing-error-in-pig/m-p/101252#M13966</link>
      <description>&lt;P&gt;Are you sure that dump behaves the same? If I do ( using your data &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;a = load '/tmp/test' using PigStorage(',') as (year,month,day);

dump a;

(2015,,08)(2015,,09)...&lt;/PRE&gt;&lt;P&gt;And if I do &lt;/P&gt;&lt;PRE&gt;b = foreach a generate month;and dump b;

()()()&lt;/PRE&gt;&lt;P&gt;Looks to me pigstorage works perfectly fine with dump.&lt;/P&gt;&lt;P&gt;If I use illustrate everything goes wrong though. After using illustrate even the dump command fails with a nullpointer exception. So not only does it not work correctly it breaks the grunt shell until I restart it. &lt;/P&gt;&lt;P&gt; I think the problem is the illustrate command:&lt;/P&gt;&lt;P&gt;Which is not too surprising since this is the warning on top of it in the pig docs:&lt;/P&gt;&lt;P&gt;Illustrate:&lt;/P&gt;&lt;P&gt;(Note! This feature is NOT maintained at the moment. We are looking for someone to adopt it.)&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 20:23:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Field-with-empty-or-no-data-causing-error-in-pig/m-p/101252#M13966</guid>
      <dc:creator>bleonhardi</dc:creator>
      <dc:date>2016-01-04T20:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Field with empty or no data causing error in pig</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Field-with-empty-or-no-data-causing-error-in-pig/m-p/101253#M13967</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/168/bleonhardi.html"&gt;@Benjamin Leonhardi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I used dump after illustrate.So i got error.So the problem is with " illustrate " command.&lt;/P&gt;&lt;P&gt;Actually i have a habit to use illustrate for every pig command i used in grunt shell to check the output.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 21:53:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Field-with-empty-or-no-data-causing-error-in-pig/m-p/101253#M13967</guid>
      <dc:creator>bsuresh</dc:creator>
      <dc:date>2016-01-04T21:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Field with empty or no data causing error in pig</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Field-with-empty-or-no-data-causing-error-in-pig/m-p/101254#M13968</link>
      <description>&lt;P&gt;It looks like a very useful command for debugging. Never used it before. Shame it seems to be broken. &lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 21:59:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Field-with-empty-or-no-data-causing-error-in-pig/m-p/101254#M13968</guid>
      <dc:creator>bleonhardi</dc:creator>
      <dc:date>2016-01-04T21:59:55Z</dc:date>
    </item>
  </channel>
</rss>

