Load data using JDBC (generic)

This section 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

Do the following to add a JDBC driver:

  1. Log in to EXAoperation user interface as an Administrator user.
  2. Select Configuration > Software and click the JDBC Drivers tab.
  3. Click Add to add the JDBC driver details.
  4. Enter the following details for the JDBC properties:
    • Driver Name: <driver name>
    • Main Class: <driverclass>
    • Prefix: <driver prefix>
    • Disable Security Manager: This is an optional field. This allows the JDBC Driver to access certificate and additional information.
    • Comment: This is an optional field.
  5. Click Add to save the settings.
  6. Select the radio button next to the driver from list of JDBC driver.
  7. Click Choose File to locate the downloaded driver and click Upload to upload the 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.

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

To test the connection, run the following statement.

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

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.