PostgreSQL

Creating Database
CloverETL Server Setup

Creating Database

Advanced users can create their own table space

We are going to create a database for Clover to use a 'user group' role which will own the database and a user role which we will add to the user group. This user role will be then used by the Server to access the database.

Database name: clover_db

UserGroup: cloveretl

User: clover

Password: clover

  1. Optionally, you can create a new tablespace

  2. Connect as postgres (default admin) to the default DB postgres and execute the following commands:

    CREATE ROLE cloveretl NOSUPERUSER NOCREATEDB NOCREATEROLE NOINHERIT NOLOGIN;
    CREATE ROLE clover NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN ENCRYPTED PASSWORD 'clover';
    GRANT cloveretl TO clover;
    CREATE DATABASE clover_db;
    GRANT ALL ON DATABASE clover_db TO cloveretl;
    REVOKE ALL ON DATABASE clover_db FROM public;

To separate the database into its own tablespace, create a tablespace before creating the database.

and use the following command to create the database:

CREATE DATABASE clover_db WITH OWNER cloveretl TABLESPACE tablespace_name;

For more information, see the PostgreSQL documentation.

CloverETL Server Setup

Example of a properties file configuration:

jdbc.driverClassName=org.postgresql.Driver
jdbc.url=jdbc:postgresql://localhost/clover?charSet=UTF-8
jdbc.username=clover
jdbc.password=clover
jdbc.dialect=org.hibernate.dialect.PostgreSQLDialect

Add a JDBC 4 compliant driver on the classpath. A JDBC driver which doesn't meet the JDBC 4 specifications won't work properly.

The JDBC driver for PostgreSQL can be downloaded from the official PostgreSQL page.

Example for Apache Tomcat: place the libraries into the TOMCAT/lib directory.