Power BI - How to Import data from PostgreSQL Database

avatar

In this post, we take a look at How to Import data from PostgreSQL Database. Previously we looked at Import data from web source in Power BI. That was one of the tutorial which allows you to import the data from the web pages which includes the tabular data in the HTML tables.

Now for this tutorial, we take a look at another data source, which in this case is PostgreSQL. This is a database source. So I am assuming either you have cloud source or the desktop source for connecting to the power BI. And this means you need two more things - ODBC driver and connector.

When you download the PostgreSQL you can also download the ODBC driver and the connector driver for the same for your desktop version. This would be give you enough options to connect your database to the Power bI be it in the cloud or the desktop version. We are considering the cloud version of the power bi only for option, but this tutorial is mostly about the desktop.

So check out the below tutorial for the data import from the PostgreSQL database to Power BI.



Let's take a look at the sample data, you can import any CSV or the JSON file into the PostgreSQL database and then make the table inside such database. This would give you an idea on setting up the import workflow for the data into the Power BI desktop.

Follow the below steps for connecting the PostgreSQL to the Power BI.

  1. Make sure to open the Power BI desktop.
  2. Click on "Get Data" button in the desktop version of the Power BI.
  3. Now give the details of the connection.
  4. Import the data into the power bi DAX editor using load editor or edit data option.
  5. If everything is correct you can save the edited data.
  6. Now your data is in the PowerBI desktop.

one.png

That's it. You can see that your data from the PostgreSQL is now in the power bi desktop.

two.png

You can now treat that as normal and continue the editing and work with it as your own dashboard for that data. Rest of the things from this point onwards won't be the specific related to the tutorial.

So the point comes in here related to the download of the jdbc and the odbc driver for the Postgresql. And where you find the same? You can find the driver details here. This is for jdbc version. You can also find the ODBC driver here. This should get you started.

Now you have everything required in case if you need anything you can go ahead and work with the tech side of things and find the stackoverflow for the rest of the setups and the working of the content. I have realized that in most cases there would be no issue and you can easily get started with the setup if you follow the steps there.

I hope you are enjoying some of my tutorials specific to the Power BI here. I have added the playlist and also have few more tutorials left and then it would be all over. Hopefully you can follow me and subscribe if you happen to like the content here with the powerbi tutorial. Let me know about the same in the comments.

I'd see you with the next Power BI tutorial next week.



0
0
0.000
1 comments
avatar

Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support. 
 

0
0
0.000