CloverETL Server 4.1.0
MongoDB 3.2.9
Driver Version (tried 3.2.2 and the clover default 2.13.2)
I am running a project where I need write to a dynamically generated (name differs each execution) collection in mongo some data that I need to shard (either before or after). I’m not trying to write or read any of the data after, but trying to shard the collection before or after the write operations fails with “Error: not connected to a mongos” even though I am running it on one of the shard servers.
I’ve tried the following in a MongoDBExecute task.
Connecting to dbName:
sh.shardCollection(“dbName.collectioName_TIMESTAMP”, {shardKey:1})
Connecting to admin:
db.runCommand( { shardCollection: “dbName.collectionName_TIMESTAMP”, key: { shardKey: 1 } } )
Running either of these commands in the mongo command line, connected to the mongos servers, result in success. Its just when I run this via Clover that I get the error.