Working with PostgreSQL in DSS

August 21, 2015

Connecting to the PostgreSQL server in DSS is very easy.

First, if needed, you should install PostgreSQL version 9. On mac, we suggest you to use the Postgres App

Then, if that is not already the case, you need to create a user and a database, as explained in the PostgreSQL guide:

psql -h localhost
CREATE USER matthieu WITH PASSWORD 'Password';

As you can see in this example, the user matthieu has been created, with password Password. This user has all privileges (can create and delete tables) on the mydb database.

Finally you need to establish a connection between DSS and your PostgreSQL-database, following the instructions given in the documentation. However, note that only the Administrator is allowed to do this. If you do not have this role, you should contact the person in charge!

First you need to log in as the DSS Administrator and go to the Administration panel:

Then, head over to the Connections tab and click on New Connection > PostgreSQL

Finally, you just need to fill the information required for the connection, in our example the host is the locahost, user is matthieu, etc. Don’t forget to give a name to your connection (beware, you can’t change it afterwards).

You can then test and create your PostgreSQL connection.

As a conclusion, a useful tip. If you are connecting to a pre-existing PostgreSQL-database, which contains tables you’ll like to use in a project, click on the Fetch tables list after creating the connection. You can massively select the tables you want, all will be created as SQL-datasets in your project.