Forum Discussion

sofiee_ans's avatar
sofiee_ans
Frequent Visitor
1 year ago
Solved

How to connect PostgreSQL Database to Power BI

Hi everyone, can anyone tell me how to connect the PostgreSQL database to Power BI and what are the requirements needed to connect PostgreSQL database to Power BI? I already have the credentials such as:

username: hev
password: SYGY_bnshjghbd
hostdb-postgresql-sgp1-97785-do-user-17837426-0.i.db.ondigitalocean.com
port: 25060
database: mydatabase
sslmode: require

  • Is it necessary to install PostgreSQL on the computer to connect a PostgreSQL database to Power BI?
  • What is the format for filling in the server section?
  • What credentials are required to enter in the server section?
  • What does sslmode=require mean?




 

  • Hi sofiee_ans  - No, but you must install the PostgreSQL ODBC or Npgsql driver.

     

    software links:

    Releases · npgsql/npgsql

    PostgreSQL: File Browser

     

    Once the above connectors installed, Open Power BI Desktop>>Click on Get DataDatabasePostgreSQL database → Click Connect.

     Enter in the server section:

    Server: db-postgresql-sgp1-97785-do-user-17837426-0.i.db.ondigitalocean.com,25060
    Database: mydatabase
    Username: hev
    Password: SYGY_bnshjghbd

    What does sslmode=require mean?

    It forces Power BI to connect to PostgreSQL only over a secure SSL/TLS connection.
    Without this, the connection may be rejected.

    Power Query PostgreSQL connector - Power Query | Microsoft Learn

    PostgreSQL: Documentation: 17: 18.9. Secure TCP/IP Connections with SSL

    PostgreSQL: File Browser

     

    I hope the above details helps.

     

  • Hi sofiee_ans 

    • Is PostgreSQL installation necessary?

      • No, you don't need to install PostgreSQL on your computer to connect to a remote PostgreSQL database. However, you must have the PostgreSQL ODBC driver installed.
    • What does sslmode=require mean?

      • This ensures that the connection between your Power BI and the PostgreSQL server is encrypted using SSL. It's essential for secure communication.
    • What credentials are required for the server section? 

      • Server: Hostname and port
      • Database: The name of the PostgreSQL database.
      • Username and Password
        You have Postgre Connector in Power BI after installing ODBC Driver connect through that please
        If this post helped please do give a kudos and accept this as a solution
        Thanks In Advance

3 Replies

  • Hi sofiee_ans  - No, but you must install the PostgreSQL ODBC or Npgsql driver.

     

    software links:

    Releases · npgsql/npgsql

    PostgreSQL: File Browser

     

    Once the above connectors installed, Open Power BI Desktop>>Click on Get DataDatabasePostgreSQL database → Click Connect.

     Enter in the server section:

    Server: db-postgresql-sgp1-97785-do-user-17837426-0.i.db.ondigitalocean.com,25060
    Database: mydatabase
    Username: hev
    Password: SYGY_bnshjghbd

    What does sslmode=require mean?

    It forces Power BI to connect to PostgreSQL only over a secure SSL/TLS connection.
    Without this, the connection may be rejected.

    Power Query PostgreSQL connector - Power Query | Microsoft Learn

    PostgreSQL: Documentation: 17: 18.9. Secure TCP/IP Connections with SSL

    PostgreSQL: File Browser

     

    I hope the above details helps.

     

  • Hi sofiee_ans 

    • Is PostgreSQL installation necessary?

      • No, you don't need to install PostgreSQL on your computer to connect to a remote PostgreSQL database. However, you must have the PostgreSQL ODBC driver installed.
    • What does sslmode=require mean?

      • This ensures that the connection between your Power BI and the PostgreSQL server is encrypted using SSL. It's essential for secure communication.
    • What credentials are required for the server section? 

      • Server: Hostname and port
      • Database: The name of the PostgreSQL database.
      • Username and Password
        You have Postgre Connector in Power BI after installing ODBC Driver connect through that please
        If this post helped please do give a kudos and accept this as a solution
        Thanks In Advance
    • sofiee_ans's avatar
      sofiee_ans
      Frequent Visitor

      I already connect PostgreSQL Database to Power BI, however there are some sort of error when I want to load the data. Is there anything I should do to troubleshoot the problem?