【发布时间】:2020-11-13 06:34:10
【问题描述】:
以下是我在 MongoDB 集合中的文档结构
{
"_id": {
"$oid": "5f48e358d43721376c397f53"
},
"heading": "this is heading",
"tags": ["tag1","tag2","tag3"],
"categories": ["projA", "projectA2"],
"content": ["This", "is", "the", "content", "of", "the", "document"],
"timestamp": 1598612312.506219,
"lang": "en"
}
我只想选择 ID 和 heading 字段(例如编写查询“select id, heading from collection”)。投影条目不起作用,我在搜索互联网后尝试了几种不同的方法。过滤、排序、分组有效,但投影无效。 如何在 PDI 中的 Mongodb 输入步骤中定义投影以从集合中选择某些字段我已尝试在查询和 field expression 中指定投影,但它不起作用。
我在同一步骤中也遇到了麻烦concatenating string。因此,如果有人也可以帮助我,我将不胜感激。
【问题讨论】: