title: Pig flatten and group all
body: <p>I have two  files and I want to do the union of these files to produce a single file as output.</p>
  
  <pre><code>file1 = "Hello world"
  file2 = "I am x";
  c = union file1,file2;
  group = group c all;
  group = (all,{(Hello world),(I am x)});
  </code></pre>
  
  <p>I want the output as (Hello world I am x);</p>
  
  <p>How to achieve it? I have tried:</p>
  
  <pre><code>res = foreach group generate flatten(all);
  </code></pre>
  
  <p>But it's not working..</p>