title: PIG: Invalid field projection. Projected field [dept_no] does not exist in schema
body: <p>I have two .csv files, </p>
  
  <p>1) list of managers split by department name, employee ID, and date hired. </p>
  
  <p>2) a file with ALL the employees, regardless of rank, and is divided by hire_date, first name, last_name.</p>
  
  <p>I want to output all the <strong>first and last names of <em>managers</em></strong> in a specific department labeled 'chem'.</p>
  
  <p>I first load both files.</p>
  
  <pre><code>managers = LOAD....
  employees = LOAD...
  </code></pre>
  
  <p>I then attempt a cogroup.</p>
  
  <pre><code>grouped = COGROUP emplo BY first_name, manag by dept_no;
  </code></pre>
  
  <p>And then try to filter out what comes out of grouped with the specific department</p>
  
  <pre><code>only_chem = FILTER grouped BY dept_no == 'chem';
  </code></pre>
  
  <p>But, when I DUMP the result, it says, in this last bit, Invalid field projection. Projected field [dept_no] does not exist in schema.</p>
  
  <p>I must be doing something wrong in how I group them. I want to get rid of extraneous information but be able to filter out all the employees and only get the managers from those, but I need the large employee file since it has first/last name fields. </p>
  
  <p>Thoughts? Thank you. </p>