Teradata SQL Assistant Tutorial (11 Steps)

By Leena Kudalkar

A Teradata database provides scalability required for data warehousing
i data image by jeancliclac from Fotolia.com

Teradata SQL Assistant is a client utility based on the Open Database Connectivity (ODBC) technology. It provides a Query writer to send SQL commands to the database, creates reports, exports and imports data between an ODBC-compliant database and tools or spreadsheets, maintains history, and provides a visual Database Explorer to view the database objects. It has two editions, namely, Teradata SQL Assistant for Microsoft Windows and Teradata SQL Assistant Web Edition. While the difference in the two editions is mainly pertaining to connectivity, this tutorial will focus on the Windows edition.

Step 1

Install the ODBC driver for your RDBMS data source on the server PC. The driver comes from the RDBMS vendor in the installation package. Also see "Teradata Tools and Utilities Installation Guide for Microsoft Windows" on the Web page in References.

Step 2

Click on the Windows "Start" menu, select "Programs" and "Teradata SQL Assistant."

Step 3

Select "Tools" and then "Define Data Source" from the Teradata SQL Assistant that you launched in Step 1.

Step 4

Choose the type of data source you want to create: User, System or File DSN. Click on "Add" and then "OK." In the "Create New Data Source" dialog, select the appropriate driver listed under "Name" and click "Finish." You have selected a driver for your RDBMS. A dialog appears.

Step 5

In the dialog, enter a name and description for this data source. Enter the IP address or name of the server on which your RDBMS resides, username and password. If you did not check "Use Integrated Security," select a security mechanism from the drop-down list. If the list is empty, consult the database administrator (DBA). Enter a value for "Parameter" as a password for the security mechanism. Optionally, add values for "Default Database" and "Account String." Account String is the account (database server login) that the DBA assigned to the username when the username was created. Click "OK" twice to close dialogs. Teradata SQL Assistant is ready to be used.

Step 6

To connect to a data source, from the main window of Teradata SQL Assistant select "Tools" and "Connect." Click the icon on the toolbar to select the data source and click "OK." In the dialog box, either select "Use Integrated Security," enter the Mechanism and Parameter, or enter the Username and Password. Optionally, enter a Default Database or an Account String. Click "OK."

Step 7

Navigate through the various panes in the main window of Teradata SQL Assistant. You will see the Query window, Answerset (results) window, a History window, and a window for Database Explorer where you can expand the tree and view all database objects in a hierarchical list.

Step 8

Select "Insert" or "Delete" from the main command list and right-click on the object for the shortcut menu to add or remove a database, table, view or column.

Step 9

To paste database object names in the SQL code in the active Query window, select the object from the Database Explorer window, right-click and select "Quick Paste" from the shortcut menu. Shortcut menu option "Browse" copies the entire list of columns from the selected table or view, to add to a simple select statement such as "select from ".

Step 10

To list all tables in a database or columns in a table, select "Tools" and "List Tables" or "List Columns," respectively. Enter the desired database name and table or view name. Click "OK."

Step 11

To disconnect from your data source, select "Tools" from the main window and "Disconnect."