| Teradata | | | | - Basic working knowledge of java and database |
| Teradata is one of the leading vendor in data analytics | | | | connectivity using JDBC |
| and data warehousing applications and softwares. | | | | - A valid teradata database |
| Especially the Teradata RDBMS is widely used across | | | | Step I: |
| various industries like airlines, logistics, Insurance, Retail | | | | Install the right version of Teradata Driver for the |
| etc. Teradata DBMS is known for its ruggedness, | | | | JDBC Interface. Make sure that TERAJDBC variable |
| scalability, handling complex queries to retrieve data | | | | is present in your environmental variables. If not set it |
| and ofcourse for the better load balancing. Teradata | | | | to the folder where you have installed the driver.eg) |
| can be interfaced by any CLI (Call Level Interface) , | | | | TERAJDBC = C:/NCR/TeraJDBC |
| JDBC (Java Database Connectivity) and ODBC (Open | | | | Step II: |
| Database Connectivity) clients. In this article we will | | | | Please place the following files in your client classpath. |
| look into how to query teradata in 3 steps using the | | | | The client can be a plain-java client or can be a web |
| widely used language Java programmatically. | | | | client. In case of web client pls place the files in the |
| Using Teradata driver for JDBC Interface | | | | server classpath. |
| In this tutorial we are going to look at the example of a | | | | - TdgssUserConfigFile.xml - configuration file for |
| Java client interacting with Teradata using Teradata | | | | teradata |
| driver for JDBC Interface. The java client can be a | | | | - terajdbc4.jar - teradata drivers for JDBC Interface |
| normal java class or an applet. JDBC is an interface | | | | jars |
| provided by Sun allows applications to interact with | | | | - tdgssjava.jar - teradata drivers for JDBC Interface |
| different databases irrespective of the vendor and | | | | jars |
| platform. To interact with Teradata, the Teradata | | | | Step III: |
| driver for JDBC Interface needs to be installed first by | | | | Integrate the following code to connect to terradata |
| downloading it from the site. More information is | | | | database |
| provided in the below given section. The Teradata | | | | /* Create the URL that is needed to connect to the |
| driver for JDBC Interface is nothing but a bridge built | | | | Teradata RDBS */ |
| with java classes that helps to interact with JDBC | | | | String databaseURL = "jdbc:teradata://127.0.0.1 |
| Interface to work with Teradata database. | | | | schema"; |
| Java Client ----> Teradata JDBC Bridge ----> | | | | /* Loads the driver */ |
| JDBC ----> Teradata RDBMS | | | | Class.forName("com.ncr.teradata.TeraDriver"); |
| Teradata driver for JDBC Interface uses a 3 tier | | | | /* Creates the connection to teradata database using |
| architecture to access the Teradata database and it is | | | | driver for JDBC Interface */ |
| the only because the database IPs will not be exposed | | | | Connection c = |
| to clients directly. So Teradata driver for JDBC | | | | DriverManager.getConnection(databaseURL, |
| Interface acts as a Teradata JDBC Gateway. | | | | databaseUserName, databaseUserpassword); |
| Assumptions: | | | | Replace 127.0.0. |