获得所有单词组合

获得所有单词组合

本文介绍了Pentaho水壶-获得所有单词组合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过pentaho水壶获得所有可能的单词组合.有没有做到这一点的步骤?

How can I get all possible combination of words through pentaho kettle. Is there a step that does this?

例如-如果我有3个单词Apple,Banana,Orange

For example - if I have 3 word Apple , Banana , Orange

我需要这些单词的所有唯一组合,即

I need all unique combinations of those words I.e.

  • comb1 = Apple;
  • Comb2 =香蕉;
  • Comb3 =橙色;
  • Comb4 =苹果+香蕉;
  • Comb5 =苹果+橙色;
  • Comb6 =香蕉+橙;
  • Comb7 =香蕉+苹果;
  • Comb8 =橙色+苹果;
  • Comb9 =橙色+香蕉;
  • Comb10 =苹果+香蕉+橙;
  • Comb11 =苹果+橙+香蕉;
  • Comb12 =香蕉+橙+苹果;
  • Comb13 =香蕉+苹果+橙;
  • Comb14 =橙+苹果+香蕉;
  • Comb15 =橙色+香蕉+苹果;
  • 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.

谢谢!

推荐答案

在PDI中,您需要使用修改的Java脚本值"步骤.因为没有默认的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

这篇关于Pentaho水壶-获得所有单词组合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 16:49