在Pentaho Kettle中,有时我有一些这样的数据(它们实际上是复杂ldap查询的结果)
x y
foo apple , banana , pear
bar potato , carrot , tomato
在哪里x
和y
我的表的列,y
这是一个普通的字符串
我想规范化表转换
x y
foo apple
foo banana
foo pear
bar potato
bar carrot
bar tomato
有可能这样做吗?也许有一个JavaScript步骤?
您可以在PDI中使用“将字段拆分为行”步骤。将Deliminator用作“ , ”,它将把行拆分为所需的输出。
在这里放了要点。您可以检查代码。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句