Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to rename a collection by using tMongoDBRow with JSON string command as "{
renameCollection:'test_service_plan_label',
to:'service_plan_label_s'
dropTarget:true
}"
I am getting an error : 'renameCollection may only be run against the admin database'
I checked with Admin team and I do have necessary access to rename. I can do it from Mongoshell using the below command
db.getSiblingDB("admin").runCommand({
renameCollection:'MongoDev01BroadbandLabel.test_service_plan_label',
to:'MongoDev01BroadbandLabel.service_plan_label_s',
dropTarget:true
})
Or by doing use admin and running db.runCommand(
{
renameCollection:'MongoDev01BroadbandLabel.test_service_plan_label',
to:'MongoDev01BroadbandLabel.service_plan_label_s',
dropTarget:true
}
)
How can I make this work with Talend?
I have the same error, have you found the solution since please