Load data from Teradata

This section explains how to connect to Teradata with Exasol and then load data.

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

Prerequisites

Download driver

Download the JDBC driver for Teradata from the Teradata Downloads page. Make sure that you download the correct version of the JDBC driver matching the version of the Teradata database.

Add JDBC driver

To add the JDBC driver, create a configuration file called settings.cfg with the following settings:

DRIVERNAME=Teradata
PREFIX=jdbc:teradata:
FETCHSIZE=100000
INSERTSIZE=-1

Follow the procedure described in Add JDBC Driver to upload the settings.cfg configuration and JDBC driver files to Exasol.

Create connection

To create a connection, run the following statement. Replace the connection string and credentials with the corresponding values for your account.

CREATE OR REPLACE CONNECTION TERADATA_DB 
 TO 'jdbc:teradata://192.168.99.105/CHARSET=UTF16' 
 USER 'dbc'  IDENTIFIED BY 'dbc';

Run the following statement to test the connection.

SELECT * 
FROM (
       IMPORT FROM JDBC AT TERADATA_DB
       STATEMENT 'SELECT ''Connection to Teradata 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.