PDI Kettle - 如何规范先进结构?

时间:2015-01-07 19:36:43

标签: pentaho kettle pdi

我在MySQL数据库中有7列数据。 Year1列属于Revenue1列。以下列具有相同的结构。我知道如何在SQL中处理这个问题,但在PDI中却没有。谁能描述一下怎么做?

mySQL表结构

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

PDI所需的标准化输出:

+------------+------+-----------+---------+
|     Ticker | Year | Keyfigure |  Value  |
+------------+------+-----------+---------+
|            |      |           |         |
|     ABC    | 2010 | Revenue   |  250000 |
|            |      |           |         |
|     ABC    | 2011 | Revenue   |  500000 |
|            |      |           |         |
|     ABC    | 2012 | Revenue   | 1000000 |
+------------+------+-----------+---------+

1 个答案:

答案 0 :(得分:0)

您是否尝试使用行反规范器?