<?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: What is use of Flatten in Pig? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/What-is-use-of-Flatten-in-Pig/m-p/123909#M22637</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2769/rushikeshdeshmukh007.html" nodeid="2769"&gt;@Rushikesh Deshmukh&lt;/A&gt;  Look at this explanation&lt;/P&gt;&lt;P&gt;&lt;A href="https://pig.apache.org/docs/r0.7.0/piglatin_ref2.html#Flatten+Operator" target="_blank"&gt;https://pig.apache.org/docs/r0.7.0/piglatin_ref2.html#Flatten+Operator&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The FLATTEN operator looks like a UDF syntactically, but it is actually an operator that changes the structure of tuples and bags in a way that a UDF cannot. Flatten un-nests tuples as well as bags. The idea is the same, but the operation and result is different for each type of structure.&lt;/P&gt;</description>
    <pubDate>Sat, 12 Mar 2016 18:29:57 GMT</pubDate>
    <dc:creator>nsabharwal</dc:creator>
    <dc:date>2016-03-12T18:29:57Z</dc:date>
    <item>
      <title>What is use of Flatten in Pig?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/What-is-use-of-Flatten-in-Pig/m-p/123908#M22636</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can anyone explain what is use of Flatten in Pig?&lt;/P&gt;</description>
      <pubDate>Sat, 12 Mar 2016 18:23:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/What-is-use-of-Flatten-in-Pig/m-p/123908#M22636</guid>
      <dc:creator>rushikeshdeshmu</dc:creator>
      <dc:date>2016-03-12T18:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: What is use of Flatten in Pig?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/What-is-use-of-Flatten-in-Pig/m-p/123909#M22637</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2769/rushikeshdeshmukh007.html" nodeid="2769"&gt;@Rushikesh Deshmukh&lt;/A&gt;  Look at this explanation&lt;/P&gt;&lt;P&gt;&lt;A href="https://pig.apache.org/docs/r0.7.0/piglatin_ref2.html#Flatten+Operator" target="_blank"&gt;https://pig.apache.org/docs/r0.7.0/piglatin_ref2.html#Flatten+Operator&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The FLATTEN operator looks like a UDF syntactically, but it is actually an operator that changes the structure of tuples and bags in a way that a UDF cannot. Flatten un-nests tuples as well as bags. The idea is the same, but the operation and result is different for each type of structure.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Mar 2016 18:29:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/What-is-use-of-Flatten-in-Pig/m-p/123909#M22637</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2016-03-12T18:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: What is use of Flatten in Pig?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/What-is-use-of-Flatten-in-Pig/m-p/123910#M22638</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/140/nsabharwal.html"&gt;Neeraj Sabharwal&lt;/A&gt;, thanks for quick reply.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Mar 2016 18:38:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/What-is-use-of-Flatten-in-Pig/m-p/123910#M22638</guid>
      <dc:creator>rushikeshdeshmu</dc:creator>
      <dc:date>2016-03-12T18:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: What is use of Flatten in Pig?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/What-is-use-of-Flatten-in-Pig/m-p/123911#M22639</link>
      <description>&lt;P&gt;I got below answer:&lt;/P&gt;&lt;P&gt;Sometimes
there is data in a tuple or bag and if we want to remove the level of
nesting from that data then Flatten modifier in Pig can be used.
Flatten un-nests bags and tuples. For tuples, the Flatten operator
will substitute the fields of a tuple in place of a tuple whereas
un-nesting bags is a little complex because it requires creating new
tuples.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Mar 2016 18:47:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/What-is-use-of-Flatten-in-Pig/m-p/123911#M22639</guid>
      <dc:creator>rushikeshdeshmu</dc:creator>
      <dc:date>2016-03-12T18:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: What is use of Flatten in Pig?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/What-is-use-of-Flatten-in-Pig/m-p/123912#M22640</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/140/nsabharwal.html"&gt;Neeraj Sabharwal&lt;/A&gt;, got the required answer, choosing the best answer and closing this thread.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Mar 2016 18:54:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/What-is-use-of-Flatten-in-Pig/m-p/123912#M22640</guid>
      <dc:creator>rushikeshdeshmu</dc:creator>
      <dc:date>2016-03-12T18:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: What is use of Flatten in Pig?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/What-is-use-of-Flatten-in-Pig/m-p/123913#M22641</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2769/rushikeshdeshmukh007.html" nodeid="2769"&gt;@Rushikesh Deshmukh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Flatten un-nests tuples as well as bags. consider a relation that has a tuple of the form (a, (b, c)). The expression GENERATE $0, flatten($1), will cause that tuple to become (a, b, c).&lt;/P&gt;&lt;P&gt;You can refer to the below link to know more and have better understanding of other operators, just in case if you need them.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.qubole.com/resources/cheatsheet/pig-function-cheat-sheet/" target="_blank"&gt;https://www.qubole.com/resources/cheatsheet/pig-function-cheat-sheet/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2016 00:01:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/What-is-use-of-Flatten-in-Pig/m-p/123913#M22641</guid>
      <dc:creator>sangam_aruns89</dc:creator>
      <dc:date>2016-09-22T00:01:01Z</dc:date>
    </item>
  </channel>
</rss>

