Filter columns in Pig script
<p>I am loading data in Pig from a CSV.
After having loaded data, I need to filter out columns .</p>

<pre><code>exportAllProductsCleaned = FOREACH exportAllProducts 
generate $0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $26, $27, $28, $29, $30, $31, $32, $33
</code></pre>

<p>Is there a way wherein I can specify only </p>

<ol>
<li>The columns I need to remove 
OR</li>
<li>The range of columns I need for ex. $1-15 and then $18 - $30</li>
</ol>

<p>Is it possible?</p>