ODBC TUTORIAL

DirectQuery DataDirect PostgreSQL ODBC drivers in Power BI DirectQuery

Updated: 10 Nov 2022

Introduction

In Power BI, you don’t get to DirectQuery with any ODBC driver or some of the data sources like Salesforce, by default. Before you start to visualize the data, you would have to load the data. In this article, you will learn how you can use Progress DataDirect ODBC drivers to DirectQuery with Progress DataDirect PostgreSQL ODBC driver.

To enable DirectQuery, Microsoft provides a Data Connector SDK. Using that, you would have to create an extension that enables DirectQuery. But this can be tricky. If you are not sure how to do this, don’t worry, Progress DataDirect has got you covered.

In this article, you will see how you can enable DirectQuery for PostgreSQL using the Progress DataDirect PostgreSQL ODBC driver. You can use this same method for any DataDirect ODBC drivers. We will provide you with Power BI connectors that enable DirectQuery for any data source.

Install and Configure Progress DataDirect PostgreSQL ODBC driver

  1. Download the Progress DataDirect PostgreSQL ODBC driver from here.
  2. Install the PostgreSQL driver by running the Setup.exe. This is a simple installation if you go through with default installation settings.
  3. After the DataDirect PostgreSQL ODBC driver has been installed, open ODBC Administrator to configure the connection.
  4. Click on Add and choose the “DataDirect X.X PostgreSQL Wire Protocol” driver.
    create new data source dialog window with DataDirect 8.0 PostgeSQL wire protocol selected from a list of drivers
  5. Configure the driver as shown below:
    odbc postgresql wire protocol driver setup window with description field set to empty host name set to hostname port number set to 5432 and database name set to database, proxy mode is set to 0 - none
  6. Go to the “tools\PowerBI” folder inside <installation directory>. The default installation directory would be “C:\Program Files\Progress\DataDirect\ODBC”.
  7. Right Click on the Install.bat file and choose “Run as Administrator”. This will take a few seconds to register the DataDirect PostgreSQL Power BI Customer connector with the Power BI Desktop application installed on your machine and register this customer connector as a trusted connector in the windows registry.
    windows file explorer window run install.bat file as administrator
  8. Open the Power BI Desktop\Custom Connectors folder in your Documents. You will find the PQX file named “DataDirectPostgreSQL.pqx”.
  9. You need to restart Power BI after this action.
  10. Enable the Connect to external datasets shared with me under DirectQuery for PBI datasets and AS in the Preview Features section in Power BI Desktop (under File | Options and settings | Options | Preview Features)
    options dialog in PowerBI; global category, preview features subcategory selected in the sidebar; the connect to external datasets shared with me option is checked and focused

Using the DataDirect Extension to DirectQuery for DataDirect ODBC Drivers

If your Power BI is already running, save your work and Restart Power BI for the extension to show up.

  1. In Power BI, click on Get Data -> More -> All -> PostgreSQL Database. Choose it and you should now see a form as shown below where it will ask for the Server name and database. Also, under Data Connectivity mode -> choose DirectQuery.
    PostgreSQL database window server input set to servername and database set to database, data connectivity mode is set to directquery
  2. Authenticate using your credentials and click on Connect.
    database authentication window with username and password inputs and select which level to apply these settings to set to postgresql
  3. Choose your database, select table, and click on Load to continue.
    database navigator window with a sample database table selected
  4. You should now see that DirectQuery has been enabled for querying the DataDirect PostgreSQL ODBC driver in the Power BI footer as shown below:
    power bi visualizations window fields category opened showing the available database fields

Conclusion

We hope this article helped you with how you can Direct Query Progress DataDirect PostgreSQL ODBC drivers. All the Progress DataDirect ODBC drivers like Salesforce, SQL Server, Oracle, IBM DB2, PostgreSQL, MySQL, etc., and the drivers you can build using OpenAccess SDK are fully compliant with ODBC standards and are internally certified to work with Power BI. Feel free to try these for your projects and if you have any questions or issues, feel free to contact us.

Connect any application to any data source anywhere

Explore all DataDirect Connectors

Need additional help with your product?

Get Customer Support