Load data from Teradata

Learn 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

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

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

    The file must end with an empty line (line break followed by zero characters).

    With some drivers you may receive an error message indicating file permission issues, or the query will hang without an error message. To resolve this issue, you may have to disable the security manager by adding the line NOSECURITY=YES in the configuration.

  2. Upload the settings.cfg file and the driver .jar file to BucketFS in the Exasol cluster.

    In Exasol 2025.1 and later you can upload files using Exasol Admin. You can also use any compatible file transfer tool, including curl on the command line. See also Manage files in BucketFS.

    In Exasol SaaS you must upload the driver through the web console.

    If the driver was downloaded as a .tar.gz or .zip archive, make sure that you extract and upload only the .jar file along with the settings.cfg file.

    Example (using curl in Linux):
    Copy
    export WRITE_PW=<your_bucketfs_write_password>
    export DATABASE_NODE_IP=<ip_address_of_cluster_node>
    export PORT=<bucketfs_port> # default: 2581

    curl -v --insecure -X PUT -T settings.cfg https://w:$WRITE_PW@$DATABASE_NODE_IP:$PORT/default/drivers/jdbc/exasol/settings.cfg
    curl -v --insecure -X PUT -T exajdbc.jar https://w:$WRITE_PW@$DATABASE_NODE_IP:$PORT/default/drivers/jdbc/exasol/exajdbc.jar

    The option --insecure or -k tells curl to bypass the TLS certificate check. This option allows you to connect to a HTTPS server that does not have a valid certificate. Only use this option if certificate verification is not possible and you trust the server.

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.