1
votes

I have 7 columns of data in a MySQL Database. The Year1 column belongs to the Revenue1 column. The following columns have the same structure. I know how to handle this in SQL, but not in PDI. Can anyone describe how to do it?

mySQL table structure

+--------+-------+-------+-------+----------+----------+----------+
| Ticker | Year1 | Year2 | Year3 | Revenue1 | Revenue2 | Revenue3 |
+--------+-------+-------+-------+----------+----------+----------+
|        |       |       |       |          |          |          |
| ABC    |  2010 |  2011 |  2012 |   250000 |   500000 |  1000000 |
+--------+-------+-------+-------+----------+----------+----------+

Desired normalized output from PDI:

+------------+------+-----------+---------+
|     Ticker | Year | Keyfigure |  Value  |
+------------+------+-----------+---------+
|            |      |           |         |
|     ABC    | 2010 | Revenue   |  250000 |
|            |      |           |         |
|     ABC    | 2011 | Revenue   |  500000 |
|            |      |           |         |
|     ABC    | 2012 | Revenue   | 1000000 |
+------------+------+-----------+---------+
1
I've understood your question, but I can not answer. One record have to be 3 record in this case ... Am I right? By the way, how many record do you have? Many type of ticker have been registered in your database? - Naga

1 Answers

0
votes

Have you tried using the row denormaliser?