• Members 38 posts
    Dec. 4, 2023, 9:19 a.m.

    Please create a step-by-step guide. TIA!

  • Mod
    Dec. 4, 2023, 9:27 a.m.

    The majority of BI solutions support multiple APIs and databases. Microsoft Power BI is a popular business intelligence tool, and PostgreSQL is a popular database. Here’s how to connect them

    A. Using Npgsql
    Download and install the latest version of Npgsql as Administrator on your computer while enabling GAC Installation. Restart your computer and launch Power BI Desktop. Select ‘PostgreSQL database’ from the ‘Get Data’ menu. Enter the Server and Database names and the User and Password. Select the table you require in the Navigator window and Load it. However, if this does not work, you can try an ODBC connection.

    B. Using an ODBC Connection
    Open Database Connectivity (ODBC) is a standard API for accessing DBMS (Wikipedia). ODBC was created to be independent of databases and operating systems. How do you use ODBC to connect PostgreSQL to Power BI Desktop?

    To begin, download and install psqlODBC from the official website.

    You must now complete two setups. One is from Power BI, while the other is from PostgreSQL.

    Open Power BI Desktop and select ‘Get Data’ after downloading and installing psqlODBC x64. Look for and select ODBC. Select Connect.

    When prompted to choose a Data Source, select None. Enter the non-credential properties in the connection string (Driver, Server, Port, and Database).

    The connection string looks like this:

    Driver={PostgreSQL ANSI(x64)}; Server=localhost; Port=5433; Database= my_database

    If you have previously entered your credential information, you may want to clear the permissions. To do so, navigate to Options and settings, then Data source settings, and finally Clear Permissions.

    After that, select Database on the credential screen and enter the Username and Password. In the data structure, you can now select the table with which you want to work.

    You must also configure the remote connection if your database is in the cloud. You must do this by editing the pga hba.conf and postgresql.conf files.

    The pg hba.conf file should be edited as follows:

    1.png

    This is how you should edit the postgresql.conf file:

    2.png

    You must restart PostgreSQL after editing these files. You can also restrict who can access the database using the IP address from your cloud source.

    C. Using EasyInsights -

    Have a look at the knowledge base. And here's a sample article "Creating GA4 Dashboards in PowerBI"

    2.png

    PNG, 56.7 KB, uploaded by agkhy on Dec. 4, 2023.

    1.png

    PNG, 80.0 KB, uploaded by agkhy on Dec. 4, 2023.