Note
The following connector article is provided by MongoDB, the owner of this connector and a member of the Microsoft Power Query Connector Certification Program. If you have questions regarding the content of this article or have changes you would like to see made to this article, visit the MongoDB website and use the support channels there.
Item | Description |
---|---|
Release State | Beta |
Products | Power BI (Datasets) Power BI (Dataflows) |
Authentication Types Supported | Database (Username/Password) |
To use the MongoDB Atlas SQL connector, you must have an Atlas federated database setup.
- Navigate to your federated database instance. In Atlas, select Data Federation from the left navigation panel.
- Select Connect to open the federated database instance connection modal.
- Select Connect using the Atlas SQL Interface.
- Select Power BI Connector.
- Copy your federated database name and MongoDB URI. You'll need them in a later step.
Note
If some or all of your data comes from an Atlas cluster, you must use MongoDB version 5.0 or greater for that cluster to take advantage of Atlas SQL.
The MongoDB Atlas SQL ODBC Driver is required to use the MongoDB Atlas SQL Connector.
- Import
- Direct Query
To connect using the Atlas SQL interface:
-
Select Get Data from the Home ribbon in Power BI Desktop.
-
Select Database from the categories on the left, select MongoDB Atlas SQL, and then select Connect.
-
If you're connecting to the MongoDB Atlas SQL connector for the first time, a third-party notice is displayed. Select "Don't warn me again with this connector" if you don't want this message to be displayed again.
Select Continue.
-
In the MongoDB Atlas SQL window that appears, fill in the following values:
- The MongoDB URI. Required
Use the MongoDB URI obtained in the prerequisites. Make sure that it doesn't contain your username and password. URIs containing username and/or passwords are rejected. - Your federated Database name. Required
Use the name of the federated database obtained in the prerequisites. - A SQL query. Optional
Enter a native Atlas SQL query to execute immediately. If the Database is the same as above, you may omit it from the query.SELECT * FROM orders
- Select either Import or DirectQuery for your desired Data Connectivity mode
Select OK.
- The MongoDB URI. Required
-
Enter your Atlas MongoDB Database access username and password and select Connect.
[!NOTE] Once you enter your username and password for a particular Atlas federated database, Power BI Desktop uses those same credentials in subsequent connection attempts. You can modify those credentials by going to File > Options and settings > Data source settings.
-
In Navigator, select one or multiple elements to import and use in Power BI Desktop. Then select either Load to load the table in Power BI Desktop, or Transform Data to open the Power Query editor where you can filter and refine the set of data you want to use, and then load that refined set of data into Power BI Desktop.
To connect using the Atlas SQL interface:
-
Select MongoDB Atlas SQL from the Power Query - Choose data source page.
-
On the Connection settings page, fill in the following values:
- The MongoDB URI. Required.
Use the MongoDB URI obtained in the prerequisites. Make sure that it doesn't contain your username and password. URIs containing username and/or passwords are rejected. - Your federated Database name. Required
Use the name of the federated database obtained in the prerequisites.
- The MongoDB URI. Required.
-
In the Navigator screen, select the data you require, and then select Transform data. This selection opens the Power Query editor so that you can filter and refine the set of data you want to use.
When a connection can't be established, the generic error message
The driver returned invalid (or failed to return) SQL_DRIVER_ODBC_VER: 03.80
is displayed.
Start by checking your credentials and that you have no network issues accessing your federated database.
You might also find the following information useful: