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

Error Connecting to Postgres tables

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Greetings, I'm trying to connect to a Postgres DB and successfully authenticated and can see all my tables, but when I try to connect any of the tables I get an error.

 

The server encountered an internal error and was unable to complete your request.

 

Any ideas?  I have connected to this DB no problem with PeriscopeData, so I know there aren't any issues.

 

Thanks in advance.

Error Connecting to Postgres tables

Follower ✭ ☆ ☆
# 2
Follower ✭ ☆ ☆

Error Connecting to Postgres tables

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hey Brian, it looks like you might have a schema error as I noted here: 

https://www.en.advertisercommunity.com/t5/Data-Studio/Getting-configuration-error-on-PostGres-Data-S...

 

[UPDATE: figured out a solution and posted it below]

Error Connecting to Postgres tables

Visitor ✭ ✭ ✭
# 4
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.

Error Connecting to Postgres tables

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hi, it seems, you posted a wrong link.

Error Connecting to Postgres tables

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

Thanks @ludoja — I'm sorry about this.

 

Link updated.