我在一个数据库中有三个表.这些表之间有一个外键.表1是表2的主表,表2是表3的主表.
我想获取数据值并在MongoDB文档中进行转换,如下所示:
{ "_id" : ObjectId("cf3977abf592d19962ff7982"), "T1Column1" : "Lorem Ipsum", "T1Column2" : ISODate("2015-11-27T16:04:24.000Z"), "Table2" : [ { "T2Column1" : NumberLong(1), "T2Column2" : "Lorem Ipsum", "Table3" : [ { "T3Column1" : "Lorem Ipsum", "T3Column2" : "Lorem Ipsum" }, { "T3Column1" : "Lorem Ipsum", "T3Column2" : "Lorem Ipsum" } ] }, { "T2Column1" : NumberLong(2), "T2Column2" : "Lorem Ipsum", "Table3" : [ { "T3Column1" : "Lorem Ipsum1", "T3Column2" : "Lorem Ipsum" }, { "T3Column1" : "Lorem Ipsum2", "T3Column2" : "Lorem Ipsum" } ] } ] }
我已经尝试在MongoDB输出步骤中使用"Mongo文档路径",但是不能使用"upsert"用于子文档,正如我们在MongoDB输出文档中看到的:
我如何使用Pentaho Data Integration(PDI)来做到这一点?