title: Pentaho spoon transformation from excel file
body: <p>I have yearly data in my excel file in such format:</p>
  
  <pre><code>Country \ Years   1980   1981   ...   2010
  Abkhazia           234    334   ...    456
  Afghanistan        466    789   ...    732
  ...
  </code></pre>
  
  <p>Here is picture<a href="https://i.stack.imgur.com/uLOgw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uLOgw.png" alt="hydro production data"></a></p>
  
  <p>And I want my data transform to 3 different tables and load it to postgres database. </p>
  
  <p>Tables should look something like that</p>
  
  <p>First table - country:</p>
  
  <pre><code>id | name
  1  | Abkhazia
  2  | Afghanistan
  </code></pre>
  
  <p>Second table dates:</p>
  
  <pre><code>id | date
  1  | 1980
  2  | 1981
  </code></pre>
  
  <p>And third is a table where all data is stored depending on country and date:</p>
  
  <pre><code>country_id    date_id   data
           1          1    234
           1          2    334
           2          1    466
           2          2    789
         ...        ...    ...
  </code></pre>
  
  <p>Any ideas how I could achieve my goal?</p>