Navigation

Create a System DSN

On this page

The following steps describe how to create a system Data Source Name (DSN) for the BI Connector for Atlas. A DSN is a saved configuration which describes a database connection to be used by an ODBC driver. Once the DSN is created, you can configure a wide range of SQL clients and BI tools to use the DSN and import data from MongoDB.

Prerequisites

Before creating a DSN, you should:

Procedure

1

Start the Microsoft ODBC Data Sources program.

Choose the program version (64-bit or 32-bit) which is appropriate for your system and ODBC driver version.

2

Select System DSN, then click Add.

Screenshot of the Windows ODBC Administrator application
3

Select a MongoDB ODBC driver from the list of available drivers.

Select either the MongoDB ODBC 1.1.0 ANSI Driver or the MongoDB ODBC 1.1.0 Unicode Driver, then click OK.

Important

Tableau requires the MongoDB ODBC 1.1.0 ANSI Driver.

Important

Tableau requires the MongoDB ANSI ODBC driver.

Note

ANSI ODBC/Connectors offer better performance but have a limited character set. Unicode ODBC/Connectors support a wider character set but may be less performant.

4

Fill in the necessary form fields.

Click the Details button to expose the lower half of the form.

The following form fields are required:

Field Name Description
Data Source Name A name of your choice.
TCP/IP Server The hostname specified in the Atlas connect dialog.
Port The IANA port number specified in the Atlas connect dialog. The default is 27015.
Database The name of the database to which you want to connect.
User

Enter either the user specified in the Atlas connect dialog or another MongoDB user with access to the database.

The user is specified in the following format:

<username>?source=<database-name>

where the <database-name> is the authentication database for the user. If admin is the authentication database, you can omit ?source=<database-name>.

  • If you are using Username and Password (SCRAM-SHA-1) authentication, the expected authenticating database is admin.

  • If you are using LDAP (PLAIN) authentication, the expected authenticating database is $external:

    Example

    myTestUser?source=$external

Password The password that corresponds to the specified User.
5

Click Test to validate the ODBC connection.

If the connection is successful, click OK to add the DSN. If the connection fails, check to make sure your MongoDB user is correctly authenticated for the database named in the connection.

Example

The values you enter will be different.

ODBC driver configuration.
1

Launch ODBC Manager.

Note

ODBC Manager is included with the MongoDB ODBC driver.

2

Click System DSN, then click Add.

ODBC Manager DSN configuration
3

Select a MongoDB ODBC driver from the list of available drivers.

Select either the MongoDB ANSI ODBC driver or the MongoDB Unicode ODBC driver, then click OK.

Important

Tableau requires the MongoDB ODBC 1.1.0 ANSI Driver.

Important

Tableau requires the MongoDB ANSI ODBC driver.

Note

ANSI ODBC/Connectors offer better performance but have a limited character set. Unicode ODBC/Connectors support a wider character set but may be less performant.

4

Enter a Data Source Name (DSN).

Optionally enter a Description.

Note

Do not close the setup window. Proceed to the next step.

5

Add the necessary keywords.

  1. Click Add to add a keyword value pair.
  2. Modify the Keyword by double-clicking on it, entering the desired keyword, then pressing enter.
  3. Modify the Value by double-clicking on it, entering the desired keyword, then pressing enter.

Using the procedure above, add the following keywords:

Keyword Value
SERVER The hostname specified in the Atlas connect dialog.
PORT The IANA port number specified in the Atlas connect dialog. The default is 27015.
DATABASE

The database to use after connecting.

Note

Required when connecting with Microsoft Excel.

UID

The username for the user that can access the active Atlas database.

Example

The user myTestUser is authenticated against the admin database:

myTestUser?source=admin

  • If you are using Username and Password (SCRAM-SHA-1) authentication, the expected authenticating database is admin.

  • If you are using LDAP (PLAIN) authentication, the expected authenticating database is $external:

    Example

    myTestUser?source=$external

PWD The password associated with the UID.

For the complete list of ODBC parameters, see Connector/ODBC Connection Parameters.

For example, your user DSN configuration should look similar to the following:

ODBC Manager DSN configuration

Note

Do not close the setup window. Proceed to the next step.

6

Click OK to finish creating the DSN.