How to Connect to a Teradata Server from SLC on Linux

Lorenz Albert Koh
Lorenz Albert Koh
Altair Employee
edited April 3 in Altair RapidMiner

To successfully connect to a Teradata server from SLC on a Linux operating system, follow these steps:

1. Install the Teradata Client

Install the 64-bit Linux Teradata client (version 14.10 or later) using the Teradata client installation kit, "TeradataToolsAndUtilitiesBase" (TTU).

2. Test Teradata Connectivity

Ensure that the Teradata client is installed correctly and can connect to the Teradata server outside of SLC.
You can use the bteq utility to test the connectivity. For example:

bteq
.logon <YOUR_SERVER>/<YOUR_USERNAME>,<YOUR_PASSWORD>

3. Update Environment Variables

Update your Linux environment to include the necessary paths for the Teradata client:

  • Add the bin and lib64 directories of the TTU to the PATH and LD_LIBRARY_PATH environment variables.
  • Modify the altairslcenv.sh file located in your SLC installation directory ( by default is /opt/altair/slc/<year>/ by appending the following lines. If the file doesn’t exist, you can create it.

export PATH=/opt/teradata/client/20.00/bin:$PATH
export LD_LIBRARY_PATH=/usr/lib64:/opt/teradata/client/20.00/lib64:$LD_LIBRARY_PATH

4. Restart the SLC Session

Restart your SLC session to apply the updated environment variable settings.

5. Access Teradata from SLC

You can now connect to the Teradata server from your SLC session using one of the following methods:

Using a LIBNAME Statement:

libname tlib teradata user=<YOUR_USERNAME>
password=<YOUR_PASSWORD>
server=<YOUR_SERVER>
database=<YOUR_DATABASE>;

Using Explicit SQL Passthrough:

proc sql;
connect to teradata (user=<YOUR_USERNAME>
password=<YOUR_PASSWORD>
server=<YOUR_SERVER>
database=<YOUR_DATABASE>);
create table newtable as
select * from connection to teradata (
select * from oldtable where prod_nm='SOME_VALUE'
);
disconnect from teradata;
quit;

Once these steps are completed, you should be able to connect to and interact with your Teradata server seamlessly from SLC.

Note: It is also possible to connect to Teradata from SLC using the LIBNAME ODBC statement if you have unixODBC and the Teradata ODBC installed and configured. A separate article covering this method will be published soon.

Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.