Loading Data from Teradata

This section explains how to connect 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 ourGitHub repository.

Download Driver

You can download the JDBC driver for Teradata(for example, terajdbc4.jar) from the Teradata Downloads page. Make sure you download the correct version of the JDBC driver matching the version of the Teradata database.

Add JDBC Driver

To add a JDBC driver, you must create a configuration file called settings.cfg. Use the below settings to create the file, replacing the JAR entry with the name of the jar file you downloaded:

DRIVERNAME=Teradata
JAR=terajdbc4.jar
DRIVERMAIN=com.teradata.jdbc.TeraDriver
PREFIX=jdbc:teradata:
NOSECURITY=NO
FETCHSIZE=100000
INSERTSIZE=-1

Follow the procedure described in Add JDBC Drivers to upload the settings.cfg configuration file and the JDBC driver jar file(s).

 

Run Statement

Run the following statement to create a connection.

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.