Data Studio
2.2K members online now
2.2K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

Getting configuration error on PostGres Data Source?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I've set up a PostGres data source, and the connector sees all the tables and fields in the DB.  But when I try to build a report I get a Configuration Error.  Then when I hit more Details it simply says "There's an error with the query".  I've attached a screen shot.  

 

Any ideas?  I'm trying to get this thing working for postgres.  

 

ThanksScreenshot from 2017-02-24 14-20-05.png

 

 

 

Getting configuration error on PostGres Data Source?

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

Hey Ray, I've got this issue too.

 

I'm using an AWS Postgres database and I've checked the logs. It turns out that DataStudio is not using the schema name in the query.

 

I see in the AWS logs:
SELECT SUM(balance) AS _balance_, uuid_ts FROM ad_accounts AS t0 GROUP BY uuid_ts ORDER BY _balance_ DESC

 

Where it should be:

SELECT SUM(balance) AS _balance_, uuid_ts FROM br_fb.ad_accounts AS t0 GROUP BY uuid_ts ORDER BY _balance_ DESC

 

Not sure how we can notify the Google devs of this shortfall.

Re: Getting configuration error on PostGres Data Source?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Okay I have a temporary workaround for anyone else with this problem. I've also posted the same solution at a few places to ensure the authors are aware of the answer. Pity these forums don't show inter-message links like Github.

 

Solution

- Create a few without a schema that queries the table (or an actual query of the table(s))

 

For example, let's say I have a schema called br_fb and within this I have a table called ad_accounts and I want all of the data to be returned. Here is the SQL query I would run:

 

CREATE VIEW br_fb_ad_accounts AS SELECT * FROM br_fb.ad_accounts;

 

 

When you reconnect your postgres data source, you'll see a table called br_fb_ad_accounts (in my example). Connect to this and you'll be good to go.

 

This isn't an ideal solution — creating temporary views without schema for the purpose of data studio — however it should help a lot of people who are blocked from using the connection.