英文:
Pentaho kettle - get all combination of words
问题
以下是翻译好的内容:
如何通过Pentaho Kettle获取所有可能的单词组合。是否有一个步骤可以做到这一点?
例如 - 如果我有3个单词:苹果,香蕉,橙子
我需要所有这些单词的唯一组合,即:
- 组合1 = 苹果;
- 组合2 = 香蕉;
- 组合3 = 橙子;
- 组合4 = 苹果 + 香蕉;
- 组合5 = 苹果 + 橙子;
- 组合6 = 香蕉 + 橙子;
- 组合7 = 香蕉 + 苹果;
- 组合8 = 橙子 + 苹果;
- 组合9 = 橙子 + 香蕉;
- 组合10 = 苹果 + 香蕉 + 橙子;
- 组合11 = 苹果 + 橙子 + 香蕉;
- 组合12 = 香蕉 + 橙子 + 苹果;
- 组合13 = 香蕉 + 苹果 + 橙子;
- 组合14 = 橙子 + 苹果 + 香蕉;
- 组合15 = 橙子 + 香蕉 + 苹果;
我需要这个过程是动态的,即根据提供的单词数量生成组合。
谢谢!
英文:
How can I get all possible combination of words through pentaho kettle. Is there a step that does this?
For example - if I have 3 word Apple , Banana , Orange
I need all unique combinations of those words I.e.
- comb1 = Apple ;
- Comb2 = Banana ;
- Comb3 = Orange ;
- Comb4 = Apple + Banana ;
- Comb5 = Apple + Orange ;
- Comb6 = Banana + Orange ;
- Comb7 = Banana + Apple ;
- Comb8 = Orange + Apple ;
- Comb9 = Orange + Banana ;
- Comb10 = Apple + Banana + Orange ;
- Comb11 = Apple + Orange + Banana ;
- Comb12 = Banana + Orange + Apple ;
- Comb13 = Banana + Apple + Orange ;
- Comb14 = Orange + Apple + Banana ;
- Comb15 = Orange + Banana + Apple ;
I need this to be dynamic I.e. combination to be generated depending upon a no of words supplied.
Thanks!
答案1
得分: 1
在PDI中,您需要使用“修改后的JavaScript值”步骤。因为没有默认的PDI步骤可以执行此操作。我已为您准备了一个转换。您可以从这个转换中获取帮助。链接
英文:
In PDI you need to use 'Modified Java Script Value' step. Because there have no default PDI step to do that. I have prepared a transformation for you. You can get help from this transformation. Link
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论