Forum Discussion

FreddyH's avatar
FreddyH
Icon for Advocate II rankAdvocate II
7 months ago

Use connection strings or additional parameters in MongoDB Atlas connection

My team is trying to move from Azure Data Factory to Microsoft Fabric but we are currently facing some issues.

 

In Azure Data Factory you can create a linked service for MongoDB Atlas using a connection string and passing additional parameters like 'readPreference=secondaryPreferred&retryWrites=true&w=majority' to read from cluster replicas.

 

In Microsoft Fabric, there is not option when creating a connection to use connection strings nor additional parameters to accomplish the same.

 

We have not found any help in the documentation.

 

Is there a workaround about this?

6 Replies

  • Hi FreddyH  , linked services to connection redisign in Fabric has been in my optinion one of the most impactful changes and unfortunately, the answer is NO, there is no direct equivalent in Microsoft Fabric to Azure Data Factory’s MongoDB Atlas linked service that allows passing a full connection string with custom parameters. 

     

    Fabric connections are managed and strongly typed, and they intentionally do not expose raw connection strings or arbitrary driver parameters; two potential workarounds:

     

    Hope this helps and hopefully in the future, more additional flexibility will be added to Fabric connections 😅 ... can I suggest you to submit this an idea Fabric Ideas - Microsoft Fabric Community 🤞 

     

    Wish you best of lucks, I would appreciate a thumbs up and/or mark this as solution to your questions. Cheers. 

  • Hi FreddyH 

     

    You’re correct - the connection interface in Microsoft Fabric doesn’t currently offer a “full connection string” field or an “additional parameters” box for MongoDB or MongoDB Atlas. This means it’s not possible to set options like readPreference=secondaryPreferred directly within the UI at this time.

     

    The Fabric MongoDB and MongoDB Atlas connectors are designed to support Copy activities and jobs, allowing you to configure standard source and destination settings such as database, collection, filters, cursor methods, and batch size. However, there’s no documented way to pass custom driver-level options through the connection string.

    When using the MongoDB and MongoDB Atlas connectors in Data Factory for Fabric, you can specify query-level settings—like filter, projection, sort, limit/skip, and batch size—but there’s currently no property available for driver-level options (such as readPreference, uuidRepresentation, retryWrites, or w).

     

    For further details, you may find this resource useful:

    Configure MongoDB in a copy activity - Microsoft Fabric | Microsoft Learn

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi FreddyH 

    Thank you for reaching out to the Microsoft Fabric Forum Community.

    deborshi_nag svenchio Thanks for the inputs.

    I hope the information provided by users was helpful. I hope you have raised this an idea. if yes please share the link here & if you have any other questions, please don't hesitate to reach out to the community.