Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
sneha_y
Contributor
Contributor

tMongoDBRow - Rename collection

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?

Labels (4)
1 Reply
Barça2025
Contributor
Contributor

I have the same error, have you found the solution since please