Heroku Postgresql with Google Datastudio

前端 未结 3 1532
傲寒
傲寒 2020-12-13 09:56

I\'m having troubles to connect an existing heroku database to Google Datastudio. I\'m trying to add the connection and I get the following:

Access de

相关标签:
3条回答
  • 2020-12-13 10:18

    Since the February 6, 2018 update, Google DataStudio allows SSL connections with PostgreSQL, which is necessary to connect to a database created via Heroku.

    To enable SSL you need to provide client key+cert and server cert, which can be accomplished by taking the following steps:

    1. Generate a self-signed cert + key with openssl for client key + certificate:
    openssl req \
           -newkey rsa:2048 -nodes -keyout client.key \
           -x509 -days 365 -out client.crt
    
    1. Use the postgres_get_server_cert.py script to get the self-signed server cert from heroku psql:

    https://raw.githubusercontent.com/thusoy/postgres-mitm/master/postgres_get_server_cert.py

    0 讨论(0)
  • 2020-12-13 10:20

    The problem is that Heroku Postgres requires an SSL connection which doesn't seem possible with Data Studio at the moment. Hopefully Google will add that option soon.

    0 讨论(0)
  • 2020-12-13 10:35

    Make sure to run the openssl command on one line to generate the client.key and client.crt in one command. It took me a couple of tries of downloading the certificates (unable to reach host error), but this finally got me connected to Heroku Postgres with GDS.

    0 讨论(0)
提交回复
热议问题