How to get PostgreSQL data to Google Data Studio

In 2022, it’s important for the product nerds, marketers and smart users to connect PostgreSQL to Google Data Studio . Google Data Studio has become indispensable in the life of any next generation Business. Whatever be the data that you are working with, its easier to create reports, analyse data and share them easily with Google Data Studio.  This amount of flexibility has made it extremely suitable for managing and tracking the day to day operations of a Business.

However there are few limitations that Google Data Studio doesn’t solve out-of-the-box. One such limitation is the ability to easily maintain multiple datasources and queries for databases like PostgreSQL in Google Data Studio.

Write PostgreSQL queries and pull data into Google Data Studio

There are few connectors to connect PostgreSQL to Google Data Studio, but we found their design and functionality very buggy and feature incomplete. So we created “Two Minute Reports PostgreSQL Connector”.

In a matter of minutes without a single line of code, Two Minute Reports PostgreSQL Connector makes it easy to connect and send data from PostgreSQL database to your Google Data Studio. 

Step 1 : Install Two Minute Reports

Now you need to install our PostgreSQL Connector for Google Data Studio. Just clicking this link will take you to our Google Data Studio Connector. After authorisation, you are now ready to use PostgreSQL Data in all your Google Data Studio Reports.

Step 2 : Connect PostgreSQL to Google Data Studio

You can add your PostgreSQL data source by clicking second authorise button, a window will open and filling in your database details. Press “Test connection” once you are ready, your credentials will be validated and saved for future use.

If you get an error message, you might have to check your credentials or configure your PostgreSQL database to whitelist the IP address of Google Servers or our Amazon Server. The error message will help in taking the appropriate action. We have also created simple scripts for you to quickly whitelist the IP address of our Amazon Serve IP Address 54.242.82.213. Please note you can only run SELECT queries in Two Minute Reports, restricting you or anybody from your team from modifying critical database data accidentally.

After adding your PostgreSQL Data Source, you can add unlimited number of query configs using the same Data Source. Your credentials are securely encrypted and stored within your Google Account. This makes sure your data does not leave the Google Servers and is not readable by anyone except you. Even when you share your Google Data Studio Report with others, they cannot read your credentials.

Step 3 : Add SQL Query Config to Google Data Studio

Once you have added a PostgreSQL Data Source, you can access it from any new or old Data Sources in Data Studio within your Google Account. This makes it easy for you to connect to your PostgreSQL database and create query configs from different data sources without having to re-enter all the credentials.

After adding your first Data Source, you will be automatically moved to the Query Configs Section. Start by selecting your newly added Data Source, you can use custom query by entering your query in the dark SQL editor or you can use tables to get all the data in the selected table. Note that for security reasons we only allow “select” based custom sql queries to be executed in your PostgreSQL database. After completing press “Save”, your Query Config will be saved.

After saving Query Config you can close the window, your newly created Query Config will be listed, select a Query Config to use and press “Connect”. Now your data fields will be listed, press “Create Report” to create new Data Studio Report.

Now you can select data your need from the right sidebar and create reports to your liking.

Try Two Minute Reports PostgreSQL Connector for free and start pulling data from PostgreSQL to your Google Data Studio. Cheers!

Was this helpful?