向Pentaho

时间:2017-08-05 06:03:42

标签: pentaho kettle pentaho-data-integration

我使用Pentaho将关系表中的SELECT语句的结果插入到另一个表中,是否可以为每一行添加UUID4标识符然后插入。

插入前的数据:

ip              country city    start_time
1.7411624393E10 Canada  London  2017-06-01 15:27:23
1.7411221531E10 Canada  Ottawa  2017-06-02 23:57:56
1.846525287E9   Canada  Langley 2017-06-02 22:27:29
2.0647254234E10 Canada  Toronto 2017-06-02 22:22:49
2.0647254234E10 Canada  Toronto 2017-06-02 22:22:12
2.0647254234E10 Canada  Toronto 2017-06-02 22:21:20

需要:

UUID ip             country city    start_time
ID1  1.7411624393E10    Canada  London  2017-06-01 15:27:23
ID2  1.7411221531E10    Canada  Ottawa  2017-06-02 23:57:56
ID3  1.846525287E9      Canada  Langley 2017-06-02 22:27:29
ID4  2.0647254234E10    Canada  Toronto 2017-06-02 22:22:49
ID5  2.0647254234E10    Canada  Toronto 2017-06-02 22:22:12
ID6  2.0647254234E10    Canada  Toronto 2017-06-02 22:21:20

我可以使用随机生成器为所有记录生成一个UUID4 ID,但我需要为所有行生成单独的UUID。

1 个答案:

答案 0 :(得分:1)

You can use "Generate random value" step to create a column with a type "Universally Unique Identifier type 4(UUID4)".