How to connect Power BI to PostgreSQL

18,717

Three ways :

1 - The ngpsql way does work if your follow the comment of Lavande:

  1. Install npgsql as Administrator (since the DLL would be pushed to GAC);
  2. During the installation stage, enabled "Npgsql GAC Installation";
  3. Restart the PC

2 - With ODBC, i used this walk-through

  • install ODBC connector here
  • start it and create a new connection (DSN)
  • in Power BI, get data, ODBC,PostGreSQL, no options
  • enter the credentials.
  • select the table(s) of interest.

3 - With the M query language.

Nota : the Power BI community posts ? well, ...

Share:
18,717

Related videos on Youtube

let_there_be_light
Author by

let_there_be_light

Updated on June 04, 2022

Comments

  • let_there_be_light
    let_there_be_light almost 2 years

    I want get data into Power BI desktop from PostgreSQL (on my local machine). I tried the solution given here (Installing ngpsql to use PostgreSQL in PowerBI), but it did not work.

    Basically, I installed the latest version of ngpsql(3.2.4) with the option to install to GAC. However, I'm getting the same error in Power BI saying that the connector requires one or more additional components.

    Am I missing any steps? I looked online but did not find any recent documentation on this.

    Any help is very much appreciated.

    Thanks

    • Shay Rojansky
      Shay Rojansky almost 7 years
      Can you please try installing 3.2.4.1 and not 3.2.4? There was a versioning issue with 3.2.4
    • Lavande
      Lavande over 6 years
      I tried npgsql 3.2.5 and it worked. My steps as below: 1. Install npgsql as Administrator (since the DLL would be pushed to GAC); 2. During the installation stage, enabled "Npgsql GAC Installation"; 3. Restart the PC, then launch PowerBI. The connection should work.
    • Manohar Reddy Poreddy
      Manohar Reddy Poreddy about 4 years
      Nov 2019 - A simple way to install is here - stackoverflow.com/a/59080365/984471
  • loving_guy
    loving_guy almost 3 years
    how is this answer relevant to Question asked by OP? he is asking solution to connect PostgreSQL to PowerBI.