Teradata
Teradata is among the leading vendor in data analytics and data warehousing applications and softwares. Particularly the Teradata RDBMS is commonly used across various industries like airlines, logistics, Insurance, Retail etc. Teradata DBMS is renowned for its ruggedness, scalability, handling complex queries to retrieve data and ofcourse for your better load balancing. Teradata could be interfaced by any CLI (Call Level Interface) , JDBC (Java Database Connectivity) and ODBC (Open Database Connectivity) clients. In this post we are going to consider how you can query teradata in 3 steps utilizing the commonly used language Java programmatically.
Using Teradata driver for JDBC Interface
Within this tutorial we will consider the illustration of a Java client getting together with Teradata using Teradata driver for JDBC Interface. The java client could be a normal java class or perhaps an applet. JDBC is definitely an interface supplied by Sun allows applications to have interaction with various databases regardless of the seller and platform. To have interaction with Teradata, the Teradata driver for JDBC Interface must be installed first by getting it from your site. More details is supplied within the below given section. The Teradata driver for JDBC Interface is absolutely nothing but a bridge constructed with java classes that can help to have interaction with JDBC Interface to work alongside Teradata database.
Java Client ----> Teradata JDBC Bridge ----> JDBC ----> Teradata RDBMS
Teradata driver for JDBC Interface utilizes a 3 tier architecture to gain access to the Teradata database which is the only real since the database IPs will never be subjected to clients directly. So Teradata driver for JDBC Interface works as a Teradata JDBC Gateway.
Assumptions:
Basic working understanding of java and database connectivity using JDBC
A legitimate teradata database
Step I:
Install the best version of Teradata Driver for your JDBC Interface. Ensure that TERAJDBC variable exists within your environmental variables. Otherwise set it up towards the folder in which you have installed the motorist.
eg) TERAJDBC = C:/NCR/TeraJDBC
Step II:
Please put the following files within your client classpath. The customer could be a plain-java client or could be a web client. In the event of web client pls put the files within the server classpath.
TdgssUserConfigFile.xml - configuration apply for teradata
terajdbc4.jar - teradata drivers for JDBC Interface jars
tdgssjava.jar - teradata drivers for JDBC Interface jars
Step III:
Integrate these code for connecting to terradata database
/* Make the URL that is required for connecting towards the Teradata RDBS */
String databaseURL = "jdbc:teradata://127...1/schema";
/* Loads the motorist */
Class.forName("com.ncr.teradata.TeraDriver");
/* Produces the link to teradata database using driver for JDBC Interface */
Connection c = DriverManager.getConnection(databaseURL, databaseUserName, databaseUserpassword);
Replace 127...1 in databaseURL with teradata database servername or IP
Replace schema in databaseURL with terdata database name
Replace databaseUserName together with your terdata database user name
Replace databaseUserpassword together with your terdata database user passwor
For more info about Teradata training, simply visit our website.
|