Loading Data from PostgreSQL

This section describes how you can connect PostgreSQL with Exasol and then load data. The driver for PostgreSQL is pre-installed with Exasol. You can see the driver details in the EXAoperation (Configuration Software > JDBC Drivers tab).

Run Statement

Run the following statement to create a connection.

CREATE OR REPLACE CONNECTION JDBC_POSTGRESQL
 TO 'jdbc:postgresql://192.168.99.100:5432/my_db'
 USER 'username'
 IDENTIFIED BY 'Exasoltest';

Run the following statement to test the connection.

 SELECT * FROM 
 (IMPORT FROM JDBC AT JDBC_POSTGRESQL
   STATEMENT 'select ''Connection works'' '
  );

Load Data

You can use the IMPORT statement to load data using the connection you created above. IMPORT supports loading data from a table or a SQL statement.

To view details about data type mappings or to migrate data, see the PostgreSQL to Exasol migration script in our GitHub repository.