Mule 如何运行MongoDB“;adminCommand";骡子
我需要在Mule 如何运行MongoDB“;adminCommand";骡子,mule,mule-studio,mule-component,Mule,Mule Studio,Mule Component,我需要在Mule中获取MongoDB数据库的列表 以下是Mongo CLI命令-db.adminCommand({listDatabases:1}) 我试过下面的方法,但不起作用 我不知道Mongo的细节,但是连接器需要一个JSON文档作为命令,您可以使用Dataweave来构建它。比如: <mongo:execute-generic-command config-ref="Mongo_DB"> <mongo:command ><![CDA
Mule
中获取MongoDB
数据库的列表
以下是Mongo CLI命令-db.adminCommand({listDatabases:1})
我试过下面的方法,但不起作用
我不知道Mongo的细节,但是连接器需要一个JSON文档作为命令,您可以使用Dataweave来构建它。比如:
<mongo:execute-generic-command config-ref="Mongo_DB">
<mongo:command ><![CDATA[#[%dw 2.0
output application/json
---
{
listDatabases: 1
}]]]></mongo:command>
</mongo:execute-generic-command>