1
votes

I am having issues setting up a Mongo DB linked service in Azure Data Factory. We are already using Mongo DB connection on our On-Premise platform to extract some data from Client side.

Now, we are migrating all our on-premise process to Azure. So this connection is part of many other things that we are migrating. I am using below connection string.

This same string is working perfectly fine on our on-premise environment but for some reason, not working in Azure.Could someone please help

ConnectionString="mongodb://username:[email protected]:20007/management-core?ssl=true&replicaSet=Product-shard-0&serverSelectionTimeoutMS=10000&connectTimeoutMS=10000&authSource=admin&authMechanism=SCRAM-SHA-1"

enter image description here

1

1 Answers

0
votes

Is difficult to answer without knowing the actual error message but I'll try:

Are you pasting the connection String just as you are showing us? with the initial words included?

The connection String should be in the format below:

mongodb://[username:password]@host[:port][/[database][?options]]

As you can see, there is no ConnectionString= at the beginning, So in your case it seems it should be as follows:

mongodb://username:[email protected]:20007/management-core?ssl=true&replicaSet=Product-shard-0&serverSelectionTimeoutMS=10000&connectTimeoutMS=10000&authSource=admin&authMechanism=SCRAM-SHA-1

Just need to remove the ConnectionString=" from the beginning

More info here