Load data using JDBC (generic)

This article explains how to connect and load data into Exasol from another database using the Exasol JDBC driver.

Prerequisites

  • The other database system must be reachable from the Exasol system.

  • The user that is used to create the connection must exist on the other database and have adequate privileges.

Add JDBC driver

To know how to upload the JDBC driver and the configuration file to BucketFS, see Add JDBC Driver.

Create connection

To create a connection, run the following statement. Replace the connection string and credentials with the corresponding values for the database that you are connecting to.

Copy
CREATE OR REPLACE CONNECTION JDBC_CON1
    TO '<jdbc_connection_string>'
    USER 'sys'
    IDENTIFIED BY 'exasol';

To test the connection, run the following statement.

Copy
select * from 
(
import from JDBC at JDBC_CON1
statement 'select 1'
);

Load data

Use IMPORT to load data from a table or SQL statement using the connection that you created.