Adding More Data Stores to Microsoft Power BI
Microsoft Power BI enables you to gain business insights by generating visualisations, dashboards and reports from your organisation's data. To gather your data, you use Power BI Desktop, which includes a number of connectors that enable you to analyse data in various popular data stores. This article shows you how you can integrate Power BI Desktop with data stores in backends for which there is no dedicated connector.
Power BI Desktop like many other analytics applications supports ODBC, a generic data access interface, which enables the default choice of back ends to be extended. To access a backend from Power BI Desktop by using ODBC you need to obtain an ODBC driver for that backend. To illustrate the process, the following steps show how to integrate Power BI Desktop with Salesforce.com and MongoDB by using an Easysoft ODBC driver for these products.
Example: How to connect Power BI to Salesforce.com
The components necessary to connect Power BI to Salesforce.com are:
Power BI Desktop <-> Salesforce.com ODBC Driver <-> Salesforce.com
Example: How to connect Power BI to MongoDB
The components necessary to connect Power BI to MongoDB are:
Power BI Desktop <-> MongoDB ODBC Driver <-> MongoDB
The Salesforce.com ODBC Driver and MongoDB ODBC driver are available to download from the Easysoft web site.
Installing, Licensing and Testing the Easysoft ODBC Driver
- Download the Windows Salesforce.com ODBC Driver or Windows MongoDB ODBC Driver as required. (Registration required.)
- Install and license the Easysoft ODBC Driver on a Windows machine.
Before you can use the Easysoft ODBC Driver to connect Power BI Desktop to Salesforce.com or MongoDB, you need to configure a System ODBC data source. An ODBC data source stores the connection details for the target database (e.g. Salesforce.com) and the ODBC driver that is required to connect to it (e.g. the Salesforce.com ODBC driver).
To run ODBC Administrator on 32-bit Windows, open Administrative Tools in Control Panel, and then open Data Sources (ODBC). (On older versions of Windows, the Control Panel applet that launches ODBC Administrator is labelled Data Sources.)
To run ODBC Administrator on 64-bit Windows, in the Windows Run dialog box, type this command:
Note This command runs the 64-bit version of ODBC Administrator. As Power BI Desktop is a 64-bit application on 64-bit Windows, this is the version you need to use.
Use ODBC Administrator to create your ODBC Driver data source.
Creating a Salesforce.com ODBC Data Source
- Choose the System DSN tab, and then choose Add.
- In the Create New Data Source dialog box, choose Easysoft ODBC-Salesforce Driver, and then choose Finish.
- Complete the Easysoft ODBC-Salesforce Driver DSN Setup dialog box:
Setting Value DSN Salesforce.com User Name The name of your Salesforce.com user. For example, firstname.lastname@example.org. Password The password for your Salesforce.com user. Token The security token for your Salesforce.com user, if required.
To find out whether you need to supply a security token, choose the Test button. If the connection attempt fails with an error which contains
LOGIN_MUST_USE_SECURITY_TOKEN, you need to supply one.
Salesforce.com emails the security token to the email address associated with your Salesforce.com user account. If you have not received a security token, you can regenerate it. Salesforce.com will then email the new security token to you. To regenerate your security token, log in to Salesforce.com and then choose Setup from the user menu. Search for "security token" in the Quick Find box. Click Reset Security Token in the Reset Security Token page. When you receive the token in your email client, copy it and then paste it into the Token field.
- Use the Test button to verify that you can successfully connect to Salesforce.com.
Creating a MongoDB ODBC Data Source
- Choose the System DSN tab, and then choose Add.
- In the Create New Data Source dialog box, choose Easysoft ODBC-MongoDB Driver, and then choose Finish.
- Complete these fields Easysoft ODBC-MongoDB Driver DSN Setup dialog box:
Setting Value DSN MongoDB Description Easysoft MongoDB ODBC Driver Server The name or IP address of the host where your MongoDB instance is running. User Name If you need to supply a user name to access your MongoDB database, enter it here. Password The password for your MongoDB user name. Ignore Auth If MongoDB does not require you to supply a user name and password, enable this option. This is a work around for applications such as Power BI Desktop that always pass a user name and password on the connection string, regardless of whether it is needed.
- Use the Test button to verify that you can successfully connect to your MongoDB database.
Connecting Power BI to your ODBC Database
You can now connect Power BI Desktop to database. In our example, the target databases are Salesforce.com and MongoDB:
- In Power BI Desktop, choose Get Data.
- In the Get Data dialog box, choose ODBC, and then choose Connect.
- In the From ODBC dialog box, select your ODBC data source, and then choose OK.
- Enter you database user name and password when prompted.
If you make a mistake when entering the user name and password, cancel the connection process. Then in Power BI Desktop Options and Settings, edit the data source. Specify the correct user name or password in the data source credentials dialog box. Otherwise, Power BI Desktop will continue to use the cached incorrect credentials.
If you are using MongoDB and you do not normally need to enter a user name and password, enter some dummy strings in the spaces provided. Assuming you enabled
Ignore Authwhen configuring the Easysoft data source, your connection will succeed.
- In the Navigator dialog box, choose the tables you want to analyse in Power BI Desktop, and then choose Load.
The ODBC data is now available to use in Power BI visualisations.