<?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 Pig script fails to write output on first attempt in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Pig-script-fails-to-write-output-on-first-attempt/m-p/21489#M3663</link>
    <description>&lt;P&gt;My pig script&amp;nbsp;(running through Hue) fails to store the results into HDFS on the first attempt. Immediately after attempting to store the data the entire pig script restarts. The script will then complete successfully on the second attempt. Here is my pig script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;offers = LOAD '/tmp/file.txt' USING PigStorage AS (tabid:CHARARRAY, offerNum:CHARARRAY);&lt;/P&gt;&lt;P&gt;describe offers;&lt;BR /&gt;offers5= LIMIT offers 5;&lt;BR /&gt;dump offers5;&lt;/P&gt;&lt;P&gt;STORE offers INTO '/tmp/folder' USING PigStorage();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think my pig script is written poorly, can you identify why the entire script would restart? I can't find anything useful in the logs! Where can I look to try to resolve this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Apr 2026 14:00:00 GMT</pubDate>
    <dc:creator>IT.Services</dc:creator>
    <dc:date>2026-04-21T14:00:00Z</dc:date>
    <item>
      <title>Pig script fails to write output on first attempt</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Pig-script-fails-to-write-output-on-first-attempt/m-p/21489#M3663</link>
      <description>&lt;P&gt;My pig script&amp;nbsp;(running through Hue) fails to store the results into HDFS on the first attempt. Immediately after attempting to store the data the entire pig script restarts. The script will then complete successfully on the second attempt. Here is my pig script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;offers = LOAD '/tmp/file.txt' USING PigStorage AS (tabid:CHARARRAY, offerNum:CHARARRAY);&lt;/P&gt;&lt;P&gt;describe offers;&lt;BR /&gt;offers5= LIMIT offers 5;&lt;BR /&gt;dump offers5;&lt;/P&gt;&lt;P&gt;STORE offers INTO '/tmp/folder' USING PigStorage();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think my pig script is written poorly, can you identify why the entire script would restart? I can't find anything useful in the logs! Where can I look to try to resolve this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 14:00:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Pig-script-fails-to-write-output-on-first-attempt/m-p/21489#M3663</guid>
      <dc:creator>IT.Services</dc:creator>
      <dc:date>2026-04-21T14:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Pig script fails to write output on first attempt</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Pig-script-fails-to-write-output-on-first-attempt/m-p/21490#M3664</link>
      <description>&lt;P&gt;I stumbled upon articles written about how to use STORE and DUMP appropriately in a pig script. It seems that I have been using a DUMP and a STORE command in our scripts to output some debugging information. Instead I should only&amp;nbsp;be using the STORE command in our scripts. DUMP is used only for debugging. If you combine the two commands the script will run TWICE!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From Apache (&lt;A target="_blank" href="http://pig.apache.org/docs/r0.12.0/perf.html#store-dump):"&gt;http://pig.apache.org/docs/r0.12.0/perf.html#store-dump):&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Store vs. Dump&lt;/P&gt;&lt;P&gt;With multi-query exection, you want to use STORE to save (persist) your results. You do not want to use DUMP as it will disable multi-query execution and is likely to slow down execution. (If you have included DUMP statements in your scripts for debugging purposes, you should remove them.)&lt;/P&gt;&lt;P&gt;DUMP Example: In this script, because the DUMP command is interactive, the multi-query execution will be disabled and two separate jobs will be created to execute this script. The first job will execute A &amp;gt; B &amp;gt; DUMP while the second job will execute A &amp;gt; B &amp;gt; C &amp;gt; STORE.&lt;/P&gt;&lt;PRE&gt;A = LOAD 'input' AS (x, y, z);
B = FILTER A BY x &amp;gt; 5;
DUMP B;
C = FOREACH B GENERATE y, z;
STORE C INTO 'output';&lt;/PRE&gt;&lt;P&gt;STORE Example: In this script, multi-query optimization will kick in allowing the entire script to be executed as a single job. Two outputs are produced: output1 and output2.&lt;/P&gt;&lt;PRE&gt;A = LOAD 'input' AS (x, y, z);
B = FILTER A BY x &amp;gt; 5;
STORE B INTO 'output1';
C = FOREACH B GENERATE y, z;
STORE C INTO 'output2';	&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Nov 2014 19:09:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Pig-script-fails-to-write-output-on-first-attempt/m-p/21490#M3664</guid>
      <dc:creator>IT.Services</dc:creator>
      <dc:date>2014-11-12T19:09:52Z</dc:date>
    </item>
    <item>
      <title>how to split tuple into to different columns in pig</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Pig-script-fails-to-write-output-on-first-attempt/m-p/93124#M3665</link>
      <description>&lt;P&gt;Dear All .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my data format in pig output file but $1 column contains name :-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dob&amp;nbsp; &amp;nbsp; &amp;nbsp; gender&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;address&lt;/P&gt;&lt;P&gt;(LACTE^MIRAM,19659802,F,4395 NOREY AVE^^ATTIC CITY^N9J^09901)&lt;BR /&gt;(JSON^MAW,19820309,M,COUNTRY CLUB DR^^NORELD^NJ^99225)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but want like below:-&lt;/P&gt;&lt;P&gt;firstname&amp;nbsp; lastname&amp;nbsp; dob&amp;nbsp; &amp;nbsp; &amp;nbsp;gender&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;address&lt;/P&gt;&lt;P&gt;(LACTE,MIRAM,19659802,F,4395 NOREY AVE^^ATTIC CITY^N9J^09901)&lt;BR /&gt;(JSON,MAW,19820309,M,COUNTRY CLUB DR^^NORELD^NJ^99225)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;HadoopHelp&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 10:59:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Pig-script-fails-to-write-output-on-first-attempt/m-p/93124#M3665</guid>
      <dc:creator>HadoopHelp</dc:creator>
      <dc:date>2019-07-24T10:59:42Z</dc:date>
    </item>
  </channel>
</rss>

