Load data from Teradata

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

  • Teradata must be reachable from the Exasol system.

  • The user credentials in the connection must be valid.

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

Create a configuration file called settings.cfg with the following settings:

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

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 your account.

Copy
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.

Copy
SELECT * 
FROM (
       IMPORT FROM JDBC AT TERADATA_DB
       STATEMENT 'SELECT ''Connection to Teradata works''';
      );

Load data

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