Configuring an ADF Linked Service Connection for MongoDB Atlas
For information on how to enable a connection for use with linked services, see Configuring a Linked Service Connection.
Field labels in this walkthrough follow the underlying Azure Data Factory property names, with the connection column that carries each value named alongside. The exact labels shown in the BimlFlex Connection Editor may differ.
After selecting MongoDB Atlas from the Linked Service Type dropdown, the form required for creating a MongoDB Atlas Linked Service will appear.
Source Only Connector
A MongoDB Atlas connection is available as a source. It is not available as a target.
The dataset addresses each object as a collection, taking the collection name from the TargetObjectName parameter.
Each MongoDB Atlas object is copied whole from its collection. The copy has no source query and passes the TargetSchemaName and TargetObjectName parameters to the dataset.
The copy source reads the setting keys below from the object's settings. Each key is a setting of the Setting Editor's Azure group, in the section Data Factory Copy Source Members, with the label the table names. These settings are blank by default. A value reaches an object as a Setting Override on that object. Add on the Azure group's Overrides tab opens the Add Setting Override form, where the Attribute Type is Object, the Connection and the Object select the object, the Setting is picked by its label (shown as Filter (Data Factory Copy Source Members)), and the Override Value holds the member's text. A key that is empty or holds the default in the table is not written to the copy source.
| Setting Key | Label | ADF Property | Default |
|---|---|---|---|
filter | Filter | filter | No default |
batchSize | Batch Size | batchSize | 100 |
cursorMethods.project | Cursor Project | cursorMethods.project | No default |
cursorMethods.sort | Cursor Sort | cursorMethods.sort | No default |
cursorMethods.limit | Cursor Limit | cursorMethods.limit | 0 |
cursorMethods.skip | Cursor Skip | cursorMethods.skip | 0 |
Choosing an Authentication Method
| Method | Credentials | Additional Settings |
|---|---|---|
| Connection String | The user name and password inside the Connection String | None |
Recommendation: Store the Connection String in Azure Key Vault rather than entering it as plaintext, since it carries the password.
Complete Example: Connection String with Azure Key Vault
| Field | Example Value |
|---|---|
| Connect via Integration Runtime | AutoResolveIntegrationRuntime |
| Database | sales |
| Azure Key Vault Linked Service | bfx-kv |
| Secret Name (for Connection String) | BFX-SRC-MongoDbAtlasConnectionString |
The secret holds the whole connection string, for example mongodb+srv://bfx_reader:<password>@cluster0.contoso.mongodb.net/sales.
Required Fields
Common Required Fields
A MongoDB Atlas Linked Service connection uses a single Authentication Type, so the same fields are required on every connection.
These common required fields are:
Connect via Integration Runtime
Connect via Integration Runtime names the integration runtime for a MongoDB Atlas Linked Service connection.
The default value is AutoResolveIntegrationRuntime.
To use another runtime, select it from the dropdown or choose + New to add one.
When a custom value is saved in the linked service form, it will be added to the custom integration runtimes.
The custom values that appear in this dropdown can be maintained in Settings under Azure - AzureIntegrationRuntime.
The runtime is stored in the connection's LS_ConnectVia_IntegrationRuntime column. Any value other than AutoResolveIntegrationRuntime is written to the linked service as the runtime it connects through.
Connection String
The Connection String identifies the MongoDB Atlas cluster and carries the user name and password (for example, mongodb+srv://bfx_reader:<password>@cluster0.contoso.mongodb.net/sales).
The Connection String field accepts the value as plaintext in the LS_ConnectionString column, or an Azure Key Vault reference held in the LS_ConnectionStringKVS_ fields that resolves to the connection string at runtime. It maps to the ADF connectionString property.
It is suggested that Azure Key Vault be used in place of manually entering the Connection String.
Database
The Database names the MongoDB Atlas database the connector reads from (for example, sales).
It is stored in the connection's LS_Db column and maps to the ADF database property.
Azure Data Factory Linked Service Additional Information
For additional information on ADF MongoDB Atlas Linked Service and its connection requirements see the Azure Data Factory MongoDB Atlas Connector documentation.