【问题标题】:Named Parameters not being substituted in Pentaho Mongo Input Query ExpressionPentaho Mongo 输入查询表达式中未替换命名参数
【发布时间】:2017-03-30 13:35:08
【问题描述】:

我在 Pentaho Kettle 中创建了一个转换,我通过 Mongo 输入从 Mongo 集合中提取一些数据,但我面临的问题是我在同一个转换中创建了两个命名参数并且它们没有在 Mongo 中被替换查询表达式选项卡。下面是我的 mongo 查询表达式:

{$and:[{'key1':{'$in':['${para1}']}},{'key2':{'$in':['${para2}']}}]}

以下是我从命令行尝试过的两个选项:

./pan.sh -file='/dir../pull_data.ktr' -param:para1=hello -param:para2=world -Level=Basic > /dir../etl.log

./pan.sh -file='/dir../pull_data.ktr' -param:"para1=hello" -param:"para2=world" -Level=Basic > /dir../etl.log

我正在使用 Mac OSX 和 Pentaho Kettle (CE 5.2)。是否可以在同一个转换中使用命名参数?

【问题讨论】:

  • @Coeur:有什么建议吗?
  • 不:我对此一无所知。

标签: mongodb transformation kettle pentaho-spoon pentaho-data-integration


【解决方案1】:

使用./pan.sh -file='/dir../pull_data.ktr' -listparam 确保您在转换设置中声明了参数。

JSON 查询中的变量替换应该可以在源代码中使用 AFAICS。

【讨论】:

  • 是的,它们是在参数选项卡中定义的。我已经检查过了。您认为这里还有其他问题吗?
  • pentaho-mongodb-plugin 在 github 上的第一次提交是 2014-08-07 并且已经有变量替换。 PDI-CE-5.2 于 2014 年 10 月 6 日发布。你能检查你的插件的时间戳吗?否则,我将不得不检查 ZIP 文件以查看打包的插件版本。
  • 2014 年 9 月 30 日。
  • 似乎 mongodb 插件已从 CE 版本中删除。检查下面提交github.com/pentaho/pentaho-kettle/…
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-01-12
  • 1970-01-01
  • 1970-01-01
  • 2015-07-26
  • 1970-01-01
  • 1970-01-01
  • 2016-03-24
相关资源
最近更新 更多