Rafael Castelao
Rafael Castelao

Reputation: 73

Tableau Online Can't Connect to PostgreSQL

I'm new to postgres and computer networks, so I'm having a hard time with this problem. I installed postgres via Homebrew on my mac recently. Up to now I could create a user on postgres and use psql as well as connect with pgAdmin. I'm now trying to connect PostgreSQL with Tableau Online to deliver some analysis but it keep giving me this error Tableau Online screenshot. Does anyone know what it might be? I already changed postgresql.conf line:

#listen_addresses = 'localhost'

to

#listen_addresses = '*'

and added the following line on pg_hba.conf:

host    all     all     all         md5

Thank you in advance :)

Upvotes: 1

Views: 1155

Answers (1)

Total_noob_on_GIS
Total_noob_on_GIS

Reputation: 99

Tableau Online is a cloud service. Machine where Tableau is running is not your mac, but actually some box somewhere in tableau cloud. By stating localhost you tell tableau to connect to postgres to that box. Which is not correct in this case. In order to connect to your postgresql you need to tell to Tableau Online the actual public ip address where postgresql server is.

So you need to figure out your postgresql public ip address e.g google "what is my ip"... there is few services available

Then give that address to Tableau public. Next thing is the firewall etc settings on your mac. I suggest you do some study what is safe and what not. But in general you should allow incoming connections from Tableau Online IP address.

Pls. note that your mac public ip will change when you use different network(wifi) and even time to time on same network. Normally servers like postgresql in production environment have static ip address.

Upvotes: 1

Related Questions