Teradata Studio User Guide
Teradata Studio User Guide
Teradata Studio
User Guide
Release 16.00
B035-2041-126K
March 2017
The product or products described in this book are licensed products of Teradata Corporation or its affiliates.
Teradata, Applications-Within, Aster, BYNET, Claraview, DecisionCast, Gridscale, MyCommerce, QueryGrid, SQL-MapReduce, Teradata
Decision Experts, "Teradata Labs" logo, Teradata ServiceConnect, Teradata Source Experts, WebAnalyst, and Xkoto are trademarks or registered
trademarks of Teradata Corporation or its affiliates in the United States and other countries.
Adaptec and SCSISelect are trademarks or registered trademarks of Adaptec, Inc.
Amazon Web Services, AWS, [any other AWS Marks used in such materials] are trademarks of Amazon.com, Inc. or its affiliates in the United
States and/or other countries.
AMD Opteron and Opteron are trademarks of Advanced Micro Devices, Inc.
Apache, Apache Avro, Apache Hadoop, Apache Hive, Hadoop, and the yellow elephant logo are either registered trademarks or trademarks of the
Apache Software Foundation in the United States and/or other countries.
Apple, Mac, and OS X all are registered trademarks of Apple Inc.
Axeda is a registered trademark of Axeda Corporation. Axeda Agents, Axeda Applications, Axeda Policy Manager, Axeda Enterprise, Axeda Access,
Axeda Software Management, Axeda Service, Axeda ServiceLink, and Firewall-Friendly are trademarks and Maximum Results and Maximum
Support are servicemarks of Axeda Corporation.
CENTOS is a trademark of Red Hat, Inc., registered in the U.S. and other countries.
Cloudera, CDH, [any other Cloudera Marks used in such materials] are trademarks or registered trademarks of Cloudera Inc. in the United States,
and in jurisdictions throughout the world.
Data Domain, EMC, PowerPath, SRDF, and Symmetrix are registered trademarks of EMC Corporation.
GoldenGate is a trademark of Oracle.
Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Company.
Hortonworks, the Hortonworks logo and other Hortonworks trademarks are trademarks of Hortonworks Inc. in the United States and other
countries.
Intel, Pentium, and XEON are registered trademarks of Intel Corporation.
IBM, CICS, RACF, Tivoli, and z/OS are registered trademarks of International Business Machines Corporation.
Linux is a registered trademark of Linus Torvalds.
LSI is a registered trademark of LSI Corporation.
Microsoft, Active Directory, Windows, Windows NT, and Windows Server are registered trademarks of Microsoft Corporation in the United States
and other countries.
NetVault is a trademark or registered trademark of Dell Inc. in the United States and/or other countries.
Novell and SUSE are registered trademarks of Novell, Inc., in the United States and other countries.
Oracle, Java, and Solaris are registered trademarks of Oracle and/or its affiliates.
QLogic and SANbox are trademarks or registered trademarks of QLogic Corporation.
Quantum and the Quantum logo are trademarks of Quantum Corporation, registered in the U.S.A. and other countries.
Red Hat is a trademark of Red Hat, Inc., registered in the U.S. and other countries. Used under license.
SAP is the trademark or registered trademark of SAP AG in Germany and in several other countries.
SAS and SAS/C are trademarks or registered trademarks of SAS Institute Inc.
Simba, the Simba logo, SimbaEngine, SimbaEngine C/S, SimbaExpress and SimbaLib are registered trademarks of Simba Technologies Inc.
SPARC is a registered trademark of SPARC International, Inc.
Symantec, NetBackup, and VERITAS are trademarks or registered trademarks of Symantec Corporation or its affiliates in the United States and
other countries.
Unicode is a registered trademark of Unicode, Inc. in the United States and other countries.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Other product and company names mentioned herein may be the trademarks of their respective owners.
The information contained in this document is provided on an "as-is" basis, without warranty of any kind, either
express or implied, including the implied warranties of merchantability, fitness for a particular purpose, or non-
infringement. Some jurisdictions do not allow the exclusion of implied warranties, so the above exclusion may not
apply to you. In no event will Teradata Corporation be liable for any indirect, direct, special, incidental, or
consequential damages, including lost profits or lost savings, even if expressly advised of the possibility of such
damages.
The information contained in this document may contain references or cross-references to features, functions, products, or services that are not
announced or available in your country. Such references do not imply that Teradata Corporation intends to announce such features, functions,
products, or services in your country. Please consult your local Teradata Corporation representative for those features, functions, products, or
services available in your country.
Information contained in this document may contain technical inaccuracies or typographical errors. Information may be changed or updated
without notice. Teradata Corporation may also make improvements or changes in the products or services described in this information at any time
without notice.
To maintain the quality of our products and services, we would like your comments on the accuracy, clarity, organization, and value of this
document. Please e-mail: [email protected]
Any comments or materials (collectively referred to as "Feedback") sent to Teradata Corporation will be deemed non-confidential. Teradata
Corporation will have no obligation of any kind with respect to Feedback and will be free to use, reproduce, disclose, exhibit, display, transform,
create derivative works of, and distribute the Feedback and derivative works thereof without limitation on a royalty-free basis. Further, Teradata
Corporation will be free to use any ideas, concepts, know-how, or techniques contained in such Feedback for any purpose whatsoever, including
developing, manufacturing, or marketing products or services incorporating Feedback.
Copyright © 2016 - 2017 by Teradata. All Rights Reserved.
Table of Contents
Preface.................................................................................................................................................................13
Purpose.......................................................................................................................................................................... 13
Audience........................................................................................................................................................................13
Revision History...........................................................................................................................................................13
Additional Information...............................................................................................................................................13
Product Safety Information........................................................................................................................................ 14
Chapter 1:
Getting Started With Studio..................................................................................................15
About Teradata Studio................................................................................................................................................ 15
Launching the Workbench......................................................................................................................................... 15
Workbench................................................................................................................................................................... 15
Customizing the Display.................................................................................................................................16
Toolbars.............................................................................................................................................................16
Preferences........................................................................................................................................................ 16
Logging Preferences.............................................................................................................................18
Displaying the Teradata Log Console................................................................................... 18
Controlling Log Levels............................................................................................................ 19
Adding Logging Levels............................................................................................................ 19
Setting the Log File Location.................................................................................................. 19
Teradata Datatools Preferences..........................................................................................................19
JDBC Connection Properties............................................................................................................. 20
Perspectives...................................................................................................................................................................20
Query Development Perspective....................................................................................................................20
Data Transfer Perspective............................................................................................................................... 21
Administration Perspective............................................................................................................................ 22
Navigator...............................................................................................................................................22
Object List Viewer................................................................................................................................23
Filters..................................................................................................................................................... 24
Filtering the Object List Viewer............................................................................................. 24
Administration Forms.........................................................................................................................24
Setting Root in the Administrative Perspective............................................................................... 25
Views..............................................................................................................................................................................25
Opening Views................................................................................................................................................. 26
Moving View Panels........................................................................................................................................ 26
Data Source Explorer.......................................................................................................................................26
Data Source Explorer Load Preferences............................................................................................27
Setting Data Source Explorer Load Preferences.............................................................................. 28
Setting Root in the Data Source Explorer.........................................................................................29
Chapter 2:
Database Connectivity.................................................................................................................. 31
About Connection Profiles......................................................................................................................................... 31
Maximum Connections per Profile Preference....................................................................................................... 32
Adding a New Driver Definition............................................................................................................................... 32
Teradata Database Connectivity................................................................................................................................ 33
Creating a Teradata Connection Profile....................................................................................................... 33
Kerberos Authentication.....................................................................................................................34
Adding a JDBC Property.................................................................................................................................34
Editing JDBC Connection Properties........................................................................................................... 35
Database Cache................................................................................................................................................ 35
QueryBand Preferences...................................................................................................................................36
Aster Database Connectivity...................................................................................................................................... 37
Creating an Aster Database Connection Profile..........................................................................................37
Creating an Aster Execution Engine Connection Profile...........................................................................38
Specify a Driver and Connection Details......................................................................................................39
Aster Connection Properties.......................................................................................................................... 41
Connecting to an Aster Database or Aster Execution Engine................................................................... 43
Disconnecting From Aster Database or Aster Execution Engine............................................................. 43
Deleting an Aster Connection Profile........................................................................................................... 43
Adding and Editing JDBC Connection Properties..................................................................................... 44
Changing the Aster User Password............................................................................................................... 44
Adding an Aster Database Driver Definition.............................................................................................. 44
New JDBC Property.............................................................................................................................45
Add a JDBC Property.......................................................................................................................... 45
About Caching Aster Schemas.......................................................................................................................46
Caching Aster Schemas....................................................................................................................... 46
Schema Cache Properties....................................................................................................................47
Editing Aster Cache Schema Properties........................................................................................... 47
About Refreshing Schema Cache.......................................................................................................48
Deleting Aster Cache Files.................................................................................................................. 48
Hadoop Connectivity.................................................................................................................................................. 48
Creating a Hadoop Generic System Connection Profile............................................................................48
Hadoop Cloudera Connection Profiles.........................................................................................................49
Creating Hadoop Cloudera Connection Profiles............................................................................ 50
Hadoop Hortonworks Connection Profiles................................................................................................. 52
Creating a Hortonworks Self-Signed Certificate............................................................................. 52
Creating Hadoop Hortonworks Connection Profiles.....................................................................53
Oracle, DB2, and SQL Server Connections.............................................................................................................. 55
Chapter 3:
Database Administration...........................................................................................................57
Teradata Database........................................................................................................................................................57
Database Object Management....................................................................................................................... 57
Viewing Database Objects.................................................................................................................. 57
Creating Database Objects..................................................................................................................57
Modifying Database Objects...............................................................................................................57
Dropping Database Objects................................................................................................................58
Interdependency Browser....................................................................................................... 79
Macro Management.........................................................................................................................................81
Creating a Macro..................................................................................................................................81
Dropping a Macro................................................................................................................................81
Stored Procedure Management......................................................................................................................82
Creating a Stored Procedure...............................................................................................................82
Dropping a Stored Procedure.............................................................................................................82
User-Defined Function (UDF) Management.............................................................................................. 82
Creating a UDF.................................................................................................................................... 82
Dropping a UDF.................................................................................................................................. 83
User-Defined Type (UDT) Management..................................................................................................... 83
Creating an Array UDT...................................................................................................................... 83
Creating a Distinct UDT..................................................................................................................... 83
Creating a Structured UDT................................................................................................................ 84
Dropping a UDT.................................................................................................................................. 84
Rights Management.........................................................................................................................................84
Connect Through Rights.....................................................................................................................84
Permanent Proxy Users Tab...................................................................................................85
Application Proxy Users Tab................................................................................................. 86
Display Tab............................................................................................................................... 86
Revoke Tab................................................................................................................................86
SQL Preview Tab......................................................................................................................87
Logon Rights......................................................................................................................................... 87
Display Tab............................................................................................................................... 88
Revoke Tab................................................................................................................................88
Grant Tab.................................................................................................................................. 88
SQL Preview Tab......................................................................................................................89
Access Logging Rules...........................................................................................................................89
Display Access Logging Tab................................................................................................... 89
Set Access Logging Tab........................................................................................................... 89
Viewing Access Logging Rules............................................................................................... 91
Setting Access Logging Rules................................................................................................. 91
Query Logging Rules........................................................................................................................... 92
Display Query Logging Rules................................................................................................. 92
Set Query Logging Tab............................................................................................................ 92
Viewing Query Logging Rules................................................................................................94
Setting Query Logging Rules.................................................................................................. 94
Move Space....................................................................................................................................................... 95
Moving Spacing Between Databases and Users...............................................................................95
Object Space......................................................................................................................................................96
Data Tools......................................................................................................................................................... 96
Compare Objects..................................................................................................................................96
About Comparing Objects......................................................................................................96
About the Compare Editor..................................................................................................... 99
Statistics...........................................................................................................................................................101
Statistics Collection View..................................................................................................................101
Collect Statistics Wizard................................................................................................................... 103
Collecting Statistics............................................................................................................................105
Drop Statistics.....................................................................................................................................105
Dropping Statistics.............................................................................................................................106
Filter Operations................................................................................................................................ 106
Chapter 4:
Teradata Data Lab.............................................................................................................................125
About Data Lab.......................................................................................................................................................... 125
About the Data Lab View..........................................................................................................................................125
Opening the Data Lab View......................................................................................................................... 126
Copying Tables to Data Labs........................................................................................................................126
Data Lab Copy Wizard..............................................................................................................................................127
About the Data Lab Copy Wizard............................................................................................................... 127
Chapter 5:
Query Development........................................................................................................................ 131
Data Tools for Query Development........................................................................................................................131
Teradata SQL Editor..................................................................................................................................................131
About the SQL Editor....................................................................................................................................131
Using the SQL File Editor................................................................................................................. 132
Drag and Drop into SQL Editor...................................................................................................... 133
SQL Editor Preferences..................................................................................................................... 133
SQL Formatter Preferences.................................................................................................. 135
SQL Editor Toolbar........................................................................................................................... 136
SQL Handling.................................................................................................................................................138
BLOB Disposition.............................................................................................................................. 139
CLOB Disposition..............................................................................................................................140
LOB Disposition.................................................................................................................................140
Setting SQL Handling Preferences.................................................................................................. 141
Execute SQL....................................................................................................................................................142
Running SQL...................................................................................................................................... 142
Format SQL Command.................................................................................................................................143
Set Connection Information.........................................................................................................................143
SQL Editor Templates................................................................................................................................... 143
Retrieving Table Rows using a SELECT Template........................................................................143
Inserting Table Rows using an INSERT Template........................................................................144
Inserting Table Rows using Parameterized Queries..................................................................... 144
Parameterized Queries.......................................................................................................... 145
Updating Table Rows using an UPDATE Template.....................................................................146
Deleting Table Rows using a DELETE Template.......................................................................... 146
Inserting Aster Analytical Functions.............................................................................................. 147
About Teradata SQL Query Builder........................................................................................................................148
Result Set Viewer....................................................................................................................................................... 149
Result Set Viewer Preferences...................................................................................................................... 152
Setting Result Set Viewer Preferences.............................................................................................154
Results Preferences............................................................................................................................ 156
Formatting the Foreground in Selected Cells................................................................................ 157
Formatting the Background in Selected Cells................................................................................157
Java Simple Date Format...................................................................................................................157
SQL History View...................................................................................................................................................... 158
SQL History Form......................................................................................................................................... 158
About SQL History Form............................................................................................................................. 160
Toolbar for SQL History............................................................................................................................... 161
Cleanup History............................................................................................................................................. 162
Import History............................................................................................................................................... 162
Export History................................................................................................................................................163
Filtering with Data Filter...........................................................................................................................................163
History Preferences........................................................................................................................................163
Database Objects Search........................................................................................................................................... 165
Chapter 6:
Table Data Development......................................................................................................... 171
About the Table Data Editor.................................................................................................................................... 171
Table Data Editor.......................................................................................................................................................172
Toolbar............................................................................................................................................................ 173
About Editing Large Data and Objects....................................................................................................... 175
About Paging Large Tables...........................................................................................................................175
Data Filter....................................................................................................................................................... 175
Opening the Table Data Editor....................................................................................................................176
Table Data Editor Preferences......................................................................................................................177
Setting Table Data Editor Preferences............................................................................................ 178
Table Data Editing..................................................................................................................................................... 178
About Editing Table Data............................................................................................................................. 178
Editing Table Data......................................................................................................................................... 178
Inserting Table Data...................................................................................................................................... 179
Displaying Column Data by Value..............................................................................................................179
Deleting Table Rows......................................................................................................................................180
Deleting Data from Cells...............................................................................................................................180
Reverting Edits............................................................................................................................................... 180
Finding and Replacing Data......................................................................................................................... 181
Find Replace........................................................................................................................................181
Selecting to Filter by Edits............................................................................................................................ 182
Viewing SQL Preview for Data Updates.....................................................................................................182
Large Data and Objects Editing............................................................................................................................... 183
About the Blob Editor................................................................................................................................... 183
Blob Editor.......................................................................................................................................... 183
Opening the Blob Editor................................................................................................................... 184
Editing BLOB Data............................................................................................................................ 185
About the Clob Editor................................................................................................................................... 185
Clob Editor..........................................................................................................................................187
Opening the Clob Editor...................................................................................................................187
Editing CLOB Data............................................................................................................................188
About the Large Binary Editor.....................................................................................................................188
Opening the Large Binary Editor.....................................................................................................189
Large Binary Editor............................................................................................................................190
Editing Large Binary Data................................................................................................................ 191
About the Large Text Editor.........................................................................................................................191
Large Text Editor............................................................................................................................... 193
Opening the Large Text Editor........................................................................................................ 193
Editing Large Text Data.................................................................................................................... 194
About the XML Data Type Editor............................................................................................................... 194
XML Editor......................................................................................................................................... 196
Chapter 7:
Data Transfer........................................................................................................................................... 203
About Transferring Data.......................................................................................................................................... 203
Transfer View................................................................................................................................................. 203
Transferring Data From Tables................................................................................................................... 204
Data Transfer Wizard................................................................................................................................................204
About the Data Transfer Wizard................................................................................................................. 204
Opening the Data Transfer Wizard.................................................................................................205
Working with Data Transfer Wizard.............................................................................................. 206
Transferring Teradata Database Data......................................................................................................... 208
Data Transfer to Teradata.................................................................................................................208
About Transfer Hadoop Table to Teradata Table............................................................. 208
Data Transfer From Teradata.......................................................................................................... 209
About Transferring a Teradata Table to a Hadoop Table................................................209
About Teradata to Hadoop Column Specification........................................................... 211
Transferring Aster Database Data............................................................................................................... 211
Data Transfer from Aster..................................................................................................................211
Exporting Data from Aster................................................................................................... 211
Data Transfer to Aster.......................................................................................................................213
Loading Data to an Aster Table........................................................................................... 213
About Transfer Hadoop Table to Aster..........................................................................................214
About Hadoop to Aster Column Specification..................................................................215
About Hadoop to Aster SQL Preview................................................................................. 216
Transferring Hadoop Data........................................................................................................................... 216
Data Transfer from Hadoop.............................................................................................................216
Data Transfer to Hadoop.................................................................................................................. 217
About Transfer Teradata Table to Hadoop........................................................................217
About Teradata to Hadoop Column Specification........................................................... 218
About Copying Teradata Objects............................................................................................................................ 218
Copying Objects Using the Data Transfer Wizard................................................................................... 219
Copying Table Data Between Teradata Databases....................................................................................220
Dropping Objects on Transfer View...........................................................................................................220
About Copy Table..........................................................................................................................................221
Copy Object Support..................................................................................................................................... 222
Copy Object Wizard.................................................................................................................................................. 223
About the Copy Object Wizard................................................................................................................... 223
About Filter Copy Column...........................................................................................................................224
About Column Specification........................................................................................................................225
Column Data Type............................................................................................................................ 226
About SQL Summary.................................................................................................................................... 228
Chapter 8:
Data Import and Export............................................................................................................229
Importing Data Into a Volatile Table......................................................................................................................229
Import and Load External Data (Teradata, Aster)................................................................................................229
About the Load Data Wizard (Teradata, Aster)........................................................................................ 229
Load Data Wizard (Teradata, Aster)...............................................................................................231
Loading Table Data from a File (Teradata, Aster)........................................................................ 232
About the Load Data Wizard and JDBC.................................................................................................... 233
Import and Load External Data (Hadoop).............................................................................................................234
About the Load Data Wizard (Hadoop).....................................................................................................234
Load Data Wizard (Hadoop)............................................................................................................235
Loading Table Data from a File (Hadoop)..................................................................................... 236
About Smart Load Wizard (Teradata, Aster)........................................................................................................ 237
Creating Tables with Smart Load (Teradata, Aster)................................................................................. 238
Editing Column Data Types (Teradata, Aster)..........................................................................................240
Smart Load Data Types for Teradata Tables..............................................................................................241
Smart Load Data Types for Aster Tables.................................................................................................... 242
About Smart Load Wizard (Hadoop)..................................................................................................................... 243
Creating Tables with Smart Load (Hadoop).............................................................................................. 245
Editing Column Data Types (Hadoop)...................................................................................................... 246
Smart Load Data Types for Hadoop Tables............................................................................................... 246
Export External Data................................................................................................................................................. 247
About the Export Data Wizard.................................................................................................................... 247
Exporting Table Data to an External File................................................................................................... 248
Transfer Progress View............................................................................................................................................. 248
About the Transfer Progress View.............................................................................................................. 248
Transfer Details.............................................................................................................................................. 250
Job Details....................................................................................................................................................... 250
Transfer History View...............................................................................................................................................251
About the Transfer History View................................................................................................................ 251
Transfer History Filter.................................................................................................................................. 253
Sort................................................................................................................................................................... 254
Chapter 9:
Troubleshooting................................................................................................................................... 255
Troubleshooting.........................................................................................................................................................255
Purpose
The purpose of this guide is to assist SQL developers and database administrators in using the Teradata
Studio development environment.
Audience
This guide is intended for SQL developers and database administrators of Teradata Database, Teradata Aster
Database, and Hadoop systems.
Revision History
Date Version Description
March 2017 Release 16.00 Updated to reflect support for Teradata Aster Execution
Engine.
January 2017 Release 16.00 Updated to reflect support for Kerberos authentication for
Hadoop clusters.
December 2016 Release 16.00 Version 16.00 initial release
Additional Information
Additional information is available at Teradata Community at http://community.teradata.com.
Related Links
URL Description
https://tays.teradata.com Use Teradata At Your Service to access Orange Books, technical alerts,
and knowledge repositories, view and join forums, and download
software packages.
www.teradata.com External site for product, service, resource, support, and other customer
information.
Related Documents
See http://www.info.teradata.com for this and other documents.
Title Publication ID
Teradata Studio, Studio Express, and Plug-in for Eclipse Installation B035-2037
Guide
Customer Education
Teradata Customer Education delivers training for your global workforce, including scheduled public
courses, customized on-site training, and web-based training. For information about the classes, schedules,
and the Teradata Certification Program, go to www.teradata.com/TEN/.
Example
Notice:
Improper use of the Reconfiguration utility can result in data loss.
Workbench
The initial display for Teradata Studio consists of a toolbar, navigation pane, and several view panes. The
views in your display depend on the Studio perspective currently selected.
Toolbars
Each view contains a toolbar that gives you quick access to functions and dialogs for creating, modifying,
and administering database objects.
Preferences
Modify preferences by selecting Window > Preferences or Teradata Studio > Preferences.
In the Preferences window, you can filter the information or navigate to the preference. Changes to
preferences are stored within your workspace.
Preference Description
Connectivity Configures the connectivity Driver Definitions by adding, editing, removing,
or copying driver definitions
Label Decorations Specifies the display format for columns in the Data Source Explorer
SQL Development Option Description
General Specifies settings for database development
Preference Description
Option Description
SQL Editor Offers options for the SQL Editor for code assist,
connection behavior for SQL files, syntax colors, and
SQL templates
SQL Query Omits the current database/schema from the generated
Builder SQL statements of the SQL Query Builder
SQL Results View Offers options for displaying the results of SQL
Options statements
General Preferences
Preference Description
Appearance Customizes the display appearance by offering options for theme, color, font,
and label preferences
Compare/Patch Customizes the display when comparing text files
Content Types Enables you to associate editors with file types
Editors Customizes editor behaviors and functions and adds or removes the editors
and file types available in the Content Types preferences
Globalization Customizes global settings for Unicode and text/graphic support
Keys Customizes the keyboard bindings
Security Customizes the secure storage, which may be needed when configuring the
Teradata Metadata Service (MDS) web service login on Linux
Workspace Changes the text file encoding for the workspace
Help Preferences
Preference Description
Content Customizes the display of the help screens as well as configuring remote help
content.
Preference Description
Teradata Datatools Sets query and size preferences for all Teradata datatools
Connection Options Sets connection preferences for connection profiles. Preferences include
maximum connections per profile. For Teradata connections, queryband
options allow you to specify user and metadata queryband settings, as well as
fastload/export options. In addition, you can specify default JDBC Connection
Options for Teradata and Aster connections.
Preference Description
Data Source Explorer Sets preferences in the Data Source Explorer for display of database and user
Load object hierarchy and for load settings that determine which databases and user
objects to load
Data Utilities Specifies the root directory location and thresholds for disk cache and
maximum rows allowed for COMMIT transactions
Dependencies Sets preferences for accessing the Meta Data Services web service
Export Sets the preference to launch a native editor and customizes export options.
Select Write SQL and Result Status to the Export File to include the SQL and
result status when exporting.
History Sets the exclude options for the History database, maximum number of rows to
display, and which columns to show in the SQL History View
Logging Specifies your preferences for logging messages
New Profile Connection Sets which types of connection profiles to show as options in the New
Types Connection Profile dialog
Object List Viewer Specifies which toolbars and menu actions are visible on the Object List Viewer
Result Set Viewer Sets preferences for Teradata Result Set Viewer.
SQL Formatter Sets preference options for the SQL Formatter.
SQL Handling Sets handling preferences for SQL result sets and options for drag-and-drop and
auto-connect functions. You can also specify the LOB sizes for handling large
values for Teradata and Aster, and customize success and failure notification as
sounds during SQL execution.
Studio Perspectives Sets options for opening perspectives.
Table Data Editor Sets preferences for selection color options, filter thresholds, and editor display
and copy/paste options.
Logging Preferences
Teradata error log messages are sent to teradata.log which is located by default in <user-profile>/
workspace-studio/.metadata/Teradata. They are also sent to the Teradata Log Console.
You can control the logging content in the log file and the Console independently. The Console is not a view
of the log file.
Perspectives
Perspectives offer integrated environments for administrating databases, creating and issuing database
queries, and transferring data between databases.
As a default, Studio opens with the Administration, Query Development, and Data Transfer perspectives.
Move between them by clicking.
To open a perspective that isn't already open, select Window > Open Perspective and choose it from the
list.
View Description
SQL Editor Develop, edit, test, and run SQL queries. It provides a Connection
Profiles option selecting the connection on which to execute the SQL
statements. Double-clicking a SQL file in the Project Explorer opens
the file in the SQL Editor.
Teradata Result Set Viewer View the result set, including options to hide columns, filter on
column values, copy data to clipboard, format cell data, and switch
between view modes. Each result set appears in a separate tab.
Teradata SQL History A list of SQL queries and their status, issued from the SQL editor,
allowing you to re-execute them.
View Description
Transfer History View View information about the data transfer event, such as the name, start
time, rows transferred, source and destination systems, status
(Completed, Canceled, or Failed), and summary.
Administration Perspective
Use the Administration Perspective to perform database administration tasks. This perspective allows you
to create, view, modify, and administer database objects, create new database users, and manage database
privileges and space.
Navigator
Within the Administration perspective, the Navigator view contains the database object tree display. It is
similar to the Data Source Explorer view in other perspectives. The Navigator displays objects in the Object
List Viewer, allowing you to view, create, and modify objects, as well as perform other administrative tasks.
The object categories vary depending on the type of connection. Right-click an option in the tree to list its
objects in the Object List Viewer. The double-click action is indicated by a check.
Use the Filters view to filter the objects on the Object List Viewer.
The objects displayed vary depending on the type of connection and the selection in the Navigator.
Breadcrumbs at the top illustrate your path. Right-click an object in the viewer to see the available
commands. The double-click action is indicated by a check. Use these commands, as well as the toolbar
icons, to manage the objects in the view.
Use the Preferences page to configure the shown Object List Viewer options.
Use the buttons in the toolbar to add, modify, or remove a filter. You can also copy a filter to the clipboard,
then past it into the Filter view for a different connection.
Administration Forms
In the Administration perspective, forms display detailed information about the selection on the Object List
Viewer. When you perform an action in the Object List Viewer, forms appear as tabs in the perspective.
For example, if you open or edit a database, the activity displays in a tabbed form.
For edit operations, use the form to perform the action on the object. Click Commit when finished.
The available forms vary between Teradata and Aster databases, as appropriate. There are no forms for
Hadoop file systems.
You can move the forms around the Details area. For example, you can arrange them side-by-side for
comparisons.
You can modify privileges for any object type that has them.
Views
The system provides multiple views and tools that allow you to explore, discover, and manage Teradata-
supported databases, to develop and execute SQL queries, and to transfer data between databases.
Many of the views appear as tabbed panes in the perspective. Not every view applies to every perspective.
This table shows the more commonly-used views in the system. Some views are explained in more detail
below.
View Description
Navigator Contains the database object tree display in the Administration
perspective.
Data Source Explorer Contains the database object tree display in the Query Development
and Data Transfer perspectives. You can create Connection Profiles
to your Teradata Database systems and interact with database objects.
Project Explorer Provides a hierarchical view of the Projects and their resource files.
You can select SQL files for editing or create new SQL files.
View Description
Object List Viewer Displays a list of objects in a database. The right-click menu changes
depending on the kind of objects in the viewer.
Details/Forms Displays specific details for the selected database object and allows
them to be created or modified
Filters Filters the list of objects in the Object List Viewer
Data Lab Provides access to your tables from a Teradata Data Lab.
SQL Editor Displays when an SQL file is opened. Initially, the SQL Editor is
opened to provide an area to enter SQL statements. Double-clicking a
file in the Project Explorer causes the file to be opened in the SQL
Editor view.
Teradata SQL History Maintains a list of SQL queries issued from the SQL editor, allowing
you to re-execute them.
Teradata Result Set Viewer Displays the result set returned by SQL queries issued from the SQL
Editor view. Individual Result Set tabs are created for each result set.
If a CALL to a stored procedure that has OUT or INOUT parameters
is run, a tab is shown in the Result Set Viewer that contains the output
values of the parameters.
Transfer History Provides a display of the Data Transfer History information in the
database. When a data transfer completes, an entry is placed in the
Transfer History.
Transfer Progress Displays a list of executing data transfer jobs and their status.
Opening Views
1. In the main menu bar, select Window > Show View.
2. Select a view in the list or click Other to display additional views in the Show View dialog.
Your current perspective determines which views you can select.
The view you select displays in the workbench.
What to Load
Use radio buttons in this section to set preferences for which objects you want loaded to the Data Source
Explorer view.
Option Description
All Databases and Users Loads all database and user objects for the connected database. Option
selected by default.
Only Databases (but include DBC Loads all databases and the DBC user, but no other user objects.
user)
Only Databases (but include DBC Loads all databases, the DBC user, and the current user.
user and myself)
Databases and Users with Loads all databases and users with PermSpace configured.
PermSpace
User Choice (includes DBC) Enables user to select only folders they want displayed in the Data
Source Explorer tree hierarchy. If all boxes are checked in What to
Display (default), this option is not available.
What to Display
Use the check boxes in this section to set preferences for which folders you want shown in the Data Source
Explorer hierarchical tree display.
Option Description
Show Databases and Users in Displays database and user objects in an expandable hierarchical view.
Hierarchical Display Option selected by default.
Include Database Indexes Folder Displays index objects in the Indexes folder. Option selected by
default.
Option Description
Include Macros Folder Displays macro objects in the Macros folder. Option selected by
default.
Include Stored Procedures Folder Displays stored procedures objects in the Stored Procedures folder.
Include Tables Folder Displays table objects in the Tables folder. Option selected by default.
Include User-Defined Functions Displays user-defined function (UDF) objects in the User-Defined
Folder Functions folder. Option selected by default.
Include User-Defined Types Displays user-defined type (UDT) objects in the User-Defined Types
Folder folder. Option selected by default.
Include Views Folder Displays view objects in the Views folder. Option selected by default.
Option Description
Load Tables space and journal details If selected, when table information loads in Data Source
Explorer, the space and journaling data is included. Option
selected by default.
Load View Columns Data Types If selected, when view information loads in Data Source
Explorer, column data types are included. Option selected by
default.
Option Description
All Databases and Users Loads all database and user objects for the connected
database. Option selected by default.
Only Databases (but include DBC Loads all databases and the DBC user, but no other user
user) objects.
Only Databases (but include DBC Loads all databases, the DBC user, and the current user.
user and myself)
Databases and Users with Loads all databases and users with PermSpace configured.
PermSpace
Option Description
Show Databases and Users in Displays database and user objects in an expandable hierarchical
Hierarchical Display view. Option selected by default.
Include Database Indexes Displays index objects in the Indexes folder. Option selected by
Folder default.
Include Macros Folder Displays macro objects in the Macros folder. Option selected by
default.
Include Stored Procedures Displays stored procedures objects in the Stored Procedures
Folder folder.
Include Tables Folder Displays table objects in the Tables folder. Option selected by
default.
Include User-Defined Displays user-defined function (UDF) objects in the User-Defined
Functions Folder Functions folder. Option selected by default.
Include User-Defined Types Displays user-defined type (UDT) objects in the User-Defined
Folder Types folder. Option selected by default.
Include Views Folder Displays view objects in the Views folder. Option selected by
default.
6. [Optional] To select all options to display, click Select All.
7. [Optional] To clear your selections, click Clear All.
8. In Load Object Details, select one or both of the following options:
Option Description
Load Tables space and If selected, when table information loads in Data Source Explorer, the
journal details load operation includes the space and journaling data. This option is
selected by default.
Load View Columns If selected, when view information loads in Data Source Explorer, the
Data Types load operation includes the column data types. This option is selected by
default.
9. [Optional] To reset and restore default selections, click Restore Defaults.
10. To apply your changes, click Apply.
11. Click OK to apply your changes and close the preference dialog.
The database and user folders in the Data Source Explorer refresh to reflect the settings you selected.
Note:
The SYSUDTLIB database always shows in the list of databases.
Option Description
Aster Database Connects to Teradata Aster Database using the Aster
Embedded JDBC Driver (default).
Aster Execution Engine (Aster-on-Hadoop) Connects to a Teradata Aster Execution Engine instance
using the Aster AX Embedded JDBC Driver (default).
DB2 for Linux, UNIX, and Windows Connects to IBM DB2 database for Linux, UNIX, or
Windows, also known as DB2 LUW.
DB2 for i5/OS Connects to IBM DB2 embedded in the i5/OS operating
system for IBM System i (iSeries) formerly AS/400.
DB2 for z/OS Connects to IBM DB2 for z/OS for IBM mainframe systems.
Generic JDBC Connects using a JDBC database connection.
Hadoop Cloudera Connects to Hadoop Cloudera systems using these user-
defined options (defaults):
• Teradata Connection to Hadoop (TDCH) for Teradata
data transfer
• SQL-H for Hadoop to Aster data transfer
• Smart Loader for external file import and export in
Hadoop
• Hive Impala JDBC for creating and running SQL
• Presto JDBC for creating and running SQL
Hadoop Generic System Connects to open source Hadoop systems using the
WebHDFS service (default).
Hadoop Hortonworks Connects to Hortonworks Hadoop systems using these
user-defined options (defaults):
• Knox Gateway
• Teradata Connection to Hadoop (TDCH) for Teradata
data transfer
• SQL-H for Hadoop to Aster data transfer
Option Description
Option Action
Creating a new In the New Connection Profile wizard, navigate to the Specify a Driver
connection profile and Connection Details step for a Teradata or Aster connection or the
JDBC Connection Properties step for a Hadoop connection.
Modifying an existing a. In the Data Source Explorer, right-click the connection name and
Aster connection profile select Properties.
b. Select Aster Database Connection Properties.
Modifying an existing a. In the Data Source Explorer, right-click the connection name and
Hadoop connection select Properties.
profile b. Select Hadoop System Connection Properties.
c. Select the JDBC tab.
Option Description
Connect when the wizard completes Connect to the database when you complete the profile.
Connect every time the workbench is Connect to this database each time you launch the
started workbench.
17. Click Next to view the Summary information.
18. Click Finish to create the connection profile.
Kerberos Authentication
When using Kerberos authentication, you must provide the TeraJDBC.config security configuration file
and specify its location in a Java property. The format of the TeraJDBC.config file is specified in the
Teradata JDBC Users Guide. Specify the location of this file in the
java.security.auth.login.configure property variable.
To add this property variable to the .ini file enter:
-Djava.security.auth.login.config=c:/TeraJDBC.config
where c:/TeraJDBC.config is the location of the TeraJDBC configuration file. The .ini file
(TeradataStudioExpress.ini, TeradataStudio.ini, or eclipse.ini) is located in the same
directory as the executable.
You must run kinit to initialize your Kerberos credential before launching the product.
Database Cache
The Database Cache option enables you to designate specific databases or users to be cached. A database
cache file is created to store the metadata for the database. The metadata describes information about the
database, such as its tables, columns, constraints, indexes, macros, parameters, stored procedures, user-
defined functions, user-defined types, views, and more. This metadata is used to populate the Data Source
Explorer and Transfer View trees.
Note:
The Database Cache option is associated with the Connection Profile. If the Connection Profile is
deleted, the Database Cache list and any database cache files that were created are also deleted.
Progress Monitor
When you first connect to the database and open the Databases folder, the database cache file is created in a
background job. To view the progress of the database cache job, open the Progress Monitor view by
selecting Window > Show View > Other > General > Progress and clicking OK.
QueryBand Preferences
User QueryBand Settings
Options Descriptions
Use User QueryBand Select this check box to enable the use of query bands for SQL Editor sessions. Use
this option to turn query bands on and off for SQL sessions.
User QueryBand Type the query band name value pairs you want available for a session. Separate
each query band name value pair with a semicolon (;) and enclose the statement
in single quotes ('). For example,
'ApplicationName=CDID;ClientUser=CS99934;'. The field provides a
sample query band string with variables you can complete.
Options Descriptions
Use Fast Load/Export Select this check box to enable the use of query bands on fast load/export query
QueryBand Settings operations.
Fast Load QueryBand Type the query band name value pairs you want applied to the fast load/export
session. Separate each query band name value pair with a semicolon (;) and
enclose the statement in single quotes ('). For example,
'ApplicationName=CDID;ClientUser=CS99934;'. The field provides a
sample query band string with variables you can complete.
Options Descriptions
Use Metadata Select this check box to enable the use of query bands when gathering metadata
QueryBand for the Data Source Explorer or Navigator tree.
Metadata QueryBand This editable field shows the metadata query band string used for the session
when the Use Metadata QueryBand check box is selected.
Option Description
Connect when the wizard completes Connect to the database when you complete the profile.
Connect every time the workbench is Connect to this database each time you launch the
started workbench.
20. Click Next to view the Summary information.
21. Click Finish to create the connection profile.
Option Description
Connect when the wizard completes Connect to the Aster instance when you complete the
profile.
Connect every time the workbench is Connect to the Aster instance each time you launch the
started workbench.
20. Click Next to view the Summary information.
21. Click Finish to create the connection profile.
Connection Properties
Option Description
Select a driver from the drop- For an Aster Database connection, the Aster Embedded JDBC Driver
down Default template is selected as the default JDBC driver template. For
Option Description
an Aster Execution Engine instance connection, the Aster AX
Embedded JDBC Driver Default template is selected as the default.
To create a new Aster JDBC driver template, click the asterisk button
( ) to add a driver definition.
Database Server Name Name of the database server that hosts the Aster Database or Aster
Execution Engine instance.
User Name Aster user name used to connect to the database server.
Password Password required to access the Aster Database or Aster Execution
Engine instance.
Port Number Port number to use for the Aster server.
Database Name Name of the default database. Your connection requires that a default
database be set when a user logs on.
Save Password Select the Save Password check box if you want the password saved.
If this option is not selected, you are required to enter a password each
time a connection to the database is made. The password you entered
in the Password field is valid for each workbench session and is not
affected by this check box.
Property Actions
You can perform these actions for the JDBC connection properties you define.
Button Description
Add Add JDBC connection properties to the list of JDBC Connection
Properties.
Remove Remove properties from the list of JDBC Connection Properties by
selecting the property and clicking Remove. The property is
immediately removed from the list.
Clear All Click to clear the entire list of connection properties.
Save Properties Click to save the properties listed in the JDBC Connection Properties
list. The Save Properties feature overrides the default connection
properties supplied for a new connection profile, and saves the list you
created.
Reset to Defaults Click to set properties to the default values. If you have saved your
properties, and therefore, overridden the system defaults, the Save
Properties values are used as your default values.
Cache Properties Click to configure schema cache properties. This action opens the
Schema Cache Properties dialog. See Caching Aster Schemas.
Button Description
Delete Cache Files Click to delete cached files. See Deleting Aster Cache Files.
Connection Actions
You can verify that the information defined in the Connection Profile connects to the desired Aster
Database or Aster Execution Engine.
Option Description
Test Connection Click to test the connection. A message box appears stating the ping
either succeeded or failed. Click OK to close the message.
Connect when the wizard Select the check box if you want to connect to the database when you
completes click Finish.
Connect every time the Select the check box if you want to automatically connect to the
workbench is started database when the application is started.
Connection Properties
Option Description
Select a driver from the drop- The Aster Embedded JDBC Driver Default template is selected as
down the default JDBC driver template for an Aster Database connection,
and the Aster AX Embedded JDBC Driver Default template is
selected as the default for an Aster Execution Engine instance
connection.
Set Up SSO Connection Enables an SSO connection, which is disabled by default. Checking this
option disables the User Name and Password fields.
Database Server Name Name of the database server that hosts the Aster Database or Aster
Execution Engine instance.
User Name Aster user name used to connect to the database server.
Option Description
Password Password required to access the Aster Database or Aster Execution
Engine instance defined in this Connection Profile.
Port Number Port number to use for the Aster server.
Database Name Name of the default database. Your connection requires that a default
database be set when a user logs on.
Save Password Saves a password.
If this option is not selected, you are required to enter a password each
time a connection to the database is made. The password you entered
in the Password field is valid for each workbench session and is not
affected by this check box.
KDC Key Distribution Center required to access an SSO-enabled Aster
database server. KDC is disabled by default and is enabled when Set
Up SSO Connection is checked.
Domain Name Domain name required to access an SSO-enabled Aster database
server. Domain name is disabled by default and is enabled when Set
Up SSO Connection is checked.
Service Name Service name required to access an SSO-enabled Aster database server.
Service name is disabled by default and is enabled when Set Up SSO
Connection is checked.
JAAS Login Configuration The location of the JAAS Login Configuration file required to access
an SSO-enabled Aster database server. JAAS Login Configuration is
disabled by default and is enabled when Set Up SSO Connection is
checked.
Note:
If you are connected to the Connection Profile and change the connection properties, when you click
OK, you are asked if you want to reconnect to the server.
Property Actions
You can perform these actions for the JDBC connection properties you define.
Button Description
Add Adds a JDBC connection properties to the list of JDBC Connection
Properties.
Remove Removes properties from the list of JDBC Connection Properties.
Clear All Clears the entire list of connection properties.
Save Properties Saves the properties listed in the JDBC Connection Properties list.
The Save Properties feature overrides the default connection
Button Description
properties supplied for a new connection profile and saves the list you
created.
Reset to Defaults Sets properties to the default values. If you have saved your properties
and overridden the system defaults, the Save Properties values are
used as your default values.
Cache Properties Configures schema cache properties.
Delete Cache Files Deletes cached files.
Connection Actions
You can verify that the information defined in the Connection Profile results in a successful connection.
Option Description
Test Connection Tests the connection.
Note:
If the property already exists in the list, a confirmation dialog displays. Click OK to replace the JDBC
property in the list.
6. Repeat the above steps to add multiple properties.
Option Description
Property Name Type the name of the property you want to add to the JDBC
Connection Properties list. The name must not exceed 30 characters.
Property Value Type the value for the property name. The value must not exceed 30
characters.
When you click OK, the property name and value you define display in the Select Property Value field in
the Add JDBC Property dialog in the format property_name = property_value.
JDBC Properties
Option Description
Select JDBC Property Select a property from the list. If you select
USDER_ENTERED_PROPERTY, the New JDBC Property dialog
displays in which you can type a new user-defined property name and
value. When you click OK, the property name and value you define
displays in the Select Property Value field in the format
property_name = property_value.
Select Property Value Select a JDBC property value from the list. Names must not exceed the
30 character limit. If no values are displayed in the list, you can select
USER_ENTERED_PROPERTY in the Select JDBC Property field and
Option Description
create a user-defined name/value property pair in the New JDBC
Property dialog.
Note:
After you select schema to cache or edit cache and open the Schemas folder, the Serialization process
occurs. To complete the caching process, you must disconnect and reconnect to the Connection Profile.
You can open the Progress Monitor to view the serialization process.
Note:
If the credentials are not valid, an error message displays.
Note:
If objects are modified in a cached schema, you must refresh the schema cache to cause the changes to
be reflected in the cache. To refresh schema cache, right-click the cached schema object in the Data
Source Explorer and select Refresh Schema Cache.
Option Description
Cache Selected Schemas Opens a dialog that confirms you want to proceed with creating a
connection to collect a list of schemas.
Select Schema Lists the schemas associated with the Connection Profile display in this
text area if the credentials for the Connection Profile are valid and the
connection is successful.
Note:
If the credentials are not valid, an error message displays. To test
your connection, close the Schema Cache Properties dialog by
clicking Close, and click Test Connection.
Note:
If objects are modified in a cached schema, you must refresh the schema cache to cause the changes to be
reflected in the cache. To refresh schema cache, right-click the cached schema object in the Data Source
Explorer and select Refresh Schema Cache.
Option Description
Single selection Selects an individual schema.
Select all Selects all schema names in the list.
To refresh the schema cache, right-click a cached schema and select Refresh Schema Cache. This deletes
the schema cache file, launches a new background job to create a new schema cache file, and refreshes the
list of schemas. You can also refresh the schema cache by deleting the schema cache files using the Aster
Database Connection Properties Delete Cache Files option and then reconnecting the Connection
Profile. The Data Source Explorer now shows the changes to the database objects. A subsequent refresh of
the Schemas folder loads the schema from the schema cache file.
Hadoop Connectivity
A Hadoop connection profile defines the information required to connect to an instance of a Hadoop
Database on your system. It contains information such as the database server name, user name, and
password required to establish the connection, port number, Hadoop vendor, and connection properties.
Access to Cloudera or Hortonworks clusters within a Kerberos realm are supported.
Option Description
Connect when the wizard completes Connect to the database when you complete the profile.
Connect every time the workbench is Connect to this database each time you launch the
started workbench.
8. Click Next.
9. At WebHDFS Host Name, type the host name or IP address of the system configured to provide
access to the Hadoop system.
10. At WebHDFS Port Number, type the port number to use to communicate with the WebHDFS
service.
11. At System Username, type the user name with permissions to access the WebHDFS host.
12. If the Hadoop cluster has High Availability enabled for the namenode (the cluster has an active and
standby namenode), select HA Enabled Cluster, then type the host name or IP address of the standby
or backup namenode or host in Secondary WebHDFS Host Name.
13. Click Next to view the Summary information.
14. Click Finish to create the connection profile.
Note:
TDCH access is not supported if Kerberos authentication is
selected.
SQL-H Select this option if you plan to use this connection for data transfers
from the Cloudera System to an Aster Database.
Note:
TDCH access is not supported if Kerberos authentication is selected.
8. [Optional] Select SQL-H if you plan to use this connection for data transfers from the Hadoop
Cloudera System to an Aster Database.
9. [Optional] Select Smart Loader if you plan to use this connection to import data from text delimited
files into a Hadoop Cloudera System.
10. [Optional] Select Impala if you plan to use Hive Impala JDBC to create and run SQL.
11. [Optional] Select Presto if you plan to use Presto JDBC to create and run SQL.
If you select this option, you cannot select the Smart Loader option.
12. [Optional] Specify when to connect:
Option Description
Connect when the wizard completes Connect to the database when you complete the profile.
Connect every time the workbench is Connect to this database each time you launch the
started workbench.
Note:
TDCH access is not supported if Kerberos authentication is
selected.
SQL-H Select this option if you plan to use this connection for data transfers
from the Hortonworks Hadoop System to an Aster Database.
SQL-H is not available for Teradata Studio Express.
Smart Loader Select this option if you plan to use this connection to import data
from text delimited files into a Hadoop System.
Hive Select this option if you plan to use this connection to access the
Hortonworks Hadoop System using SQL from the SQL Editor. This
option uses the Hortonworks Hive JDBC Driver to access your
Hadoop System.
Presto Select this option if you plan to use this connection to access the
Hortonworks Hadoop System using SQL from the SQL Editor. This
option uses the Presto JDBC Driver to access your Hadoop System.
From the Run the command: keytool -export -alias gateway-identity -rfc -
Knox server file knox.crt -keystore <path to gateway.jks keystore. For
example: /usr/lib/knox/data/security/keystore/gateway.jks
From a web Follow your browser's instructions for exporting a certificate. For example, if you use
browser Chrome:
a. Enter the Knox server:port in the address bar. You will see a message that the
connection is not private.
b. Click Advanced, and then click the Proceed to site link.
c. Click on the lock in the address bar and select Details.
d. Click View certificate.
e. Select the Details tab in the resulting dialog and click the Copy to file... button.
f. In the resulting Certificate Export Wizard, save the certificate as Base-64 encoded.
2. Install the certificate into your Java Runtime certificate store by running the command: %JDK_HOME%
\bin\keytool.exe -importcert -alias "TDH240 Knox self-signed certificate" -
file cert_location/<filename>.txt -keystore %JRE_HOME%\lib\security\cacerts
where %JDK_HOME% is an environment variable with the location of a JDK and %JRE_HOME% is the
location of the JRE used to run Studio.
The keytool.exe will ask for the password to the certificate store. The password is changeit unless you
have already changed it.
Note:
TDCH access is not supported if Kerberos authentication is selected.
8. [Optional] Select SQL-H if you plan to use this connection for data transfers from the Hortonworks
Hadoop System to an Aster Database.
Option Description
Connect when the wizard completes Connect to the database when you complete the profile.
Connect every time the workbench is Connect to this database each time you launch the
started workbench.
13. Click Next.
14. If you selected the Knox Gateway option, specify the properties for the Knox gateway connection:
a) At Gateway Host, type the host name.
b) At Gateway Port Number, type the port number for the host.
c) At Cluster Name, type the cluster name.
d) At Gateway User Name, type the user name for the Knox Gateway.
e) [Optional] In Gateway Password, type the password for the Knox Gateway.
f) Select Save Password to save the password.
g) Select SSL Enabled to enable Secure Sockets Layer encryption.
h) Select a driver from Select a driver from the drop-down.
The default JDBC driver for the Hadoop provider and connection service is selected. If you want to
create a new driver definition, click .
i) Click Next.
15. If Kerberos authentication is selected you will need to enter authentication properties.
a) If Smart Load or Hive are selected, enter the name of the Kerberos Realm.
b) If Presto is selected, enter the SSL TrustStore Path and SSL TrustStore Password.
c) Click Next.
16. If you selected a TDCH and/or Smart Load connection, enter the WebHDFS connection credentials:
a) At WebHDFS Host Name, type the host name or IP address of the system configured to provide
access to the Hadoop systems.
b) At WebHDFS Port Number, type the port number to use to communicate with the Hadoop
system.
c) At WebHDFS User Name, type the user name with permissions to access the WebHDFS host.
For systems configured with Kerberos authentication, this should typically be the principal user
name.
d) If the Hadoop cluster has High Availability enabled for the namenode (the cluster has an active and
standby namenode), select HA Enabled Cluster, then type the host name or IP address of the
standby or backup Namenode/WebHDFS host at Secondary WebHDFS Host Name.
e) Click Next.
17. If you selected a SQL-H and/or Hive or Presto connection, enter the WebHCat connection credentials:
Teradata Database
Note:
Foreign server administration is only available for 15.00.02.04+ systems.
Note:
Name value pairs for host type must be edited in the General tab.
Button Description
Add a. Click Add.
b. Click in the Value Type column and select the type.
c. If you selected Simple Value or Scalar SubQuery Value, enter the name in the Name
column and the value or subquery in the Value column. If you selected System Variable
Value, enter the Name, click in the Value column, and select a system variable.
Option Description
Host Type Change the type of the host.
Comment Change the comments for the foreign server.
4. [Optional] Click Security to specify the name and security type for the authorization that stores the
credentials for the foreign server.
a) In Trusted Credential, select a security type from the list.
• Definer — Indicates the authorization that describes the trusted remote user credentials is present
in the database that contains the foreign server. You can specify either a Definer or an Invoker, but
not both.
• Invoker — Indicates the authorization that describes the trusted remote user credentials is present
in the user database at the time the foreign server is accessed. You can assign only one INVOKER
authorization name per database.
• None — Indicates that this foreign server does not support associated credentials.
b) In Authorization, change the name for the authorization.
5. [Optional] Click Name Value Pairs and identify the name value pairs that the table operators can use to
connect to this foreign server.
Name value pairs for host type, remote server, and port are automatically generated as available using
pairs. Changing the server information in General, changes the name value pairs. The pairs are global
attributes of the server object.
• To add a name value pair, click the Add button and type a name in the Name column and the value
in the Value column.
• To edit a name value pair, change the name in the Name column or the value in the Value column,
and click Add.
• To remove a pair, select the name value pair and click Remove. You cannot remove the host type,
remote server, or port using pairs.
• To move a pair up in the list order, select the name value pair and click Up.
• To move a pair down in the list order, select the name value pair and click Down.
6. [Optional] Click Import to associate an IMPORT table operator with this foreign server for importing
data into Teradata Database.
These name value pairs are local attributes of the IMPORT table operator.
a) In Database, type the name of the database that contains the import table operator.
b) In Table Operator, type the name of the table operator to use.
1. In the Navigator pane of the Administration perspective, right-click on Foreign Servers and select
Show Foreign Servers from the pop-up menu.
A list of foreign servers displays in the Object List Viewer.
2. In the Object List Viewer, select the foreign server you want to delete.
You can select multiple foreign servers to drop at the same time.
3. In the Object Viewer toolbar, click (Drop Foreign Server).
4. Click Yes when prompted to confirm the DROP action.
The foreign server is dropped from the connected database and disappears from the Object List Viewer
list.
Option Description
Name Name of the secure zone.
Zone DBA Name of the primary zone DBA. You cannot edit this field.
Root Name The zone root associated with this secure zone. To change the zone root, it must not have
any objects, descendants, roles, or profiles assigned to it.
4. [Optional] Click SQL to review the generated SQL statements.
5. Click Commit.
The secure zone settings are updated.
Table Management
Profile Management
About User Profiles
You can group sets of configuration settings that are commonly used and assigned to users in profiles. Any
user created as a member of the profile automatically inherits the profile settings. If no settings are specified
for the profile, the default system-level settings are used. Settings in the user profile override the settings for
the user in a CREATE USER or MODIFY USER statement. Password attribute settings in a user profile
override the corresponding system-level password settings.
Note:
Changes to password attribute settings in a profile do not require a system restart to take effect. The new
settings take effect the next time the users assigned to the profile log on.
Required Privileges
Note:
Profile Query Band Administration and Profile Row Level Security Constraint Administration are
enabled for the Admin Profile form.
Creating a Profile
A profile defines a set of user resource parameters, such as spool space allocations, password control
parameters, and query bands. When a new user is created, they can be assigned a profile to automatically
confer on them the resources defined for the profile.
1. In the Navigator, right-click Profiles, and click Show Profiles.
A list of profiles defined in the connected system appears in the Object List Viewer. The list is filtered
according to any filters you have applied.
Privileges Modifications
Privileges can be granted and modified at the system or object level. For more information about which
privileges are associated with the Public Role, and User grantee type, see SQL Data Control Language.
Trigger Management
Creating a Trigger
Triggers automatically perform SQL operations in response to INSERT, UPDATE, DELETE, or MERGE
modifications of the tables on which they are defined.
1. In the Navigator, right-click the database or user that contains the table for which you want to define a
trigger, and click Show Tables.
A list of the tables the database or user contains appears in the Object List Viewer.
2. In the Object List Viewer, right-click the table for which you want to define a trigger, and click Show
Triggers.
Any triggers that have been defined for the table are listed in the Object List Viewer.
3. In the Object List Viewer, click .
A Create Trigger property form opens in the Details view.
4. Enter the properties that define your new trigger.
For more information on creating triggers, see SQL Data Definition Language and SQL Fundamentals.
5. [Optional] Click the SQL tab to see the SQL code that will be executed on the connected system to create
the new trigger.
6. Click Commit.
If an error is returned, modify your trigger properties to address the error.
The trigger is created in the connected database.
7. Click OK.
A property form shows the new trigger properties.
Roles Management
About Roles
A role defines a set of privileges on database objects. Database administrators (DBAs) can define different
roles for different job functions and responsibilities, then assign those roles to different users. Typically,
users are members of more than one role. Roles can also be assigned to other roles.
Required Privileges
You must have the CREATE ROLE privilege to create a role. This applies to both standard database roles
and external roles. When you create a role, you automatically receive the creator privileges. This gives you
the DROP ROLE privilege and the WITH ADMIN OPTION privilege, but does not give you the privilege to
assign a default role to a user. A newly created role has no associated privileges until the privileges are
granted.
Creating a Role
A role defines a set of database privileges on database objects. A user who is assigned a role automatically
gains all the privileges of that role. For more information on roles and privileges, see SQL Fundamentals,
SQL Data Control Language, and SQL Data Definition Language - Syntax and Examples.
1. In the Navigator, right-click Roles, and click Show Roles.
Dataset Schemas
Teradata Database 16.00 supports a new data type called DATASET. A DATASET is a Custom Data Type
(CDT) used to represent self-describing data stored in a format that conforms to a schema. Thus a
DATASET has an associated schema that can be included along with the column data or referenced.
1. In the Navigator, right-click Dataset Schemas, and click Show Dataset Schemas.
A list of dataset schemas defined in the connected system appears in the Object List Viewer. The list is
filtered according to any filters you have applied.
2. In the Object List Viewer, right-click the dataset schema you want to view, and click Open in Dataset
Schema Form.
A property form shows the dataset schema properties.
2. In the Object List Viewer toolbar, select the dataset schema you want to drop and click .
3. Click OK to confirm.
Authorization Management
Creating an Authorization
An authorization creates an association between a database user and an OS platform user identification,
allowing external routines to run in secure mode using the context, privileges, and access control granted to
the specified OS user. For more information about authorizations, see SQL Data Definition Language -
Syntax and Examples. For information about the authorization trusted extensions that you use to access
remote systems using QueryGrid, see the Teradata QueryGrid documentation.
1. In the Navigator, right-click Databases and click Show Databases.
A list of the databases and users in the connected system appears in the Object List Viewer. The list is
filtered according to any filters you have applied.
2. In the Object List Viewer, right-click the database or user for which you want to define an
authorization, and click Show Authorizations.
Any authorizations that have been defined for the database or user are listed in the Object List Viewer.
View Management
Creating a View
A view is a virtual table that you can use as a physical table to retrieve data defining columns from
underlying views or tables, or both.
1. In the Navigator, expand the Databases, right-click a database or user, and click Show Views.
A list of the views defined in the connected system appears in the Object List Viewer. The list is filtered
according to any filters you have applied.
Modifying a View
1. In the Navigator, expand the Databases, right-click a database or user, and click Show Views.
A list of the views defined in the connected system appears in the Object List Viewer. The list is filtered
according to any filters you have applied.
2. In the Object List Viewer, right-click the profile you want to modify, and click Modify View.
A Modify View property form opens in the Details view.
3. Modify properties by entering new information into the property fields.
Dropping a View
1. In the Navigator, expand the Databases, right-click a database or user, and click Show Views.
A list of the views defined in the connected system appears in the Object List Viewer. The list is filtered
according to any filters you have applied.
2. In the Object List Viewer toolbar, select the view you want to drop and click .
3. Click OK to confirm.
Dependency Browser
The Dependency Browser shows object dependencies within a Teradata Database system. For example, the
browser can discover which objects a specific object references or which objects are referenced by a specific
object.
The Dependency Browser uses Teradata Meta Data Services (MDS) to discover these relationships. The
Dependency Browser communicates with MDS via its web services interface. You must configure the MDS
Administrator to manage the current Teradata database server and configure the Teradata Dependency
Browser with the MDS web service login. Refer to Dependencies Preferences to configure the MDS web
service system and user credentials.
Meta Data Services currently does not support User-defined Functions and User-defined Types. Requests to
return dependent objects for these two object types return an empty list. To resolve other issues when
objects are not returned by the Teradata Dependency Browser, see Meta Data Services Synchronization
Issues.
Dependencies Preferences
The Dependencies Preferences dialog enables you to set the Meta Data Services web service system and
user credentials.
Option Description
Web Service System Specifies the name of the MDS web service system
Port Specifies the port number for the MDS web service
Secure server Selects the HTTPS option when connecting to the MDS web service
User Specifies the MDS User name
Password Specifies the MDS password
Test User Tests the user credentials. A list of available database systems is
displayed in a dialog box.
Option Description
Display Message Sets the display of warning messages generated by the Copy and
Compare features
Interdependency Browser
The Interdependency Browser shows a selected database object and its relationships to other database
objects. A database object is displayed as a rectangle containing the name of the object and the type of the
object. An icon is included to represent the object's type.
A relationship between objects is shown by a connecting line from one object to another. There are two
types of connecting lines:
Line Type Description
Solid Indicates that the object on the arrowhead end of the line is contained
by the other object (such as a database containing a table).
Dashed Indicates that the object references the other object (such as a view
referencing a table).
The selected object initially appears with a gray background and shows the objects that reference the selected
object as well as the objects that it references.
Note:
By default, the diagram does not show columns and parameters.
You can show or remove related objects by using the context menu associated with the object whose
diagram element is currently selected. The current selection is indicated by a bold line outlining the object's
rectangle or the line indicating a relationship between two objects.
The actions that appear in the Interdependency Browser context menus are described in Interdependency
Browser Actions.
Actions that can add or remove objects from the diagram have a check mark next to the action name to
indicate that objects of that type appear in the diagram. Choosing a selected action removes all of the
selected object's references to objects of the action's type. Selecting a cleared action adds the selected object's
references to the objects of the action's type (if any).
Note:
If dependent objects are not returned for the browser, there may be Meta Data Services synchronization
issues that need to be considered. Refer to the Meta Data Services Synchronization Issues page to help
resolve these issues.
Action Description
Show Object In Object Viewer Details of the selected object appear in the Object Viewer. This action
is unavailable if the object cannot be shown in the Object Viewer.
Show Containing Object Object that contains the selected object appears in the diagram; the
containment relationship line appears between them; and the
Action Description
containing object is selected. If the containing object is already in the
diagram but not currently visible, the diagram scrolls until it appears.
Show Default Referring Objects Default set of objects that refer to the selected object appears with the
relationships between them.
Show Default Referred To Default set of objects to which the selected object refers appears in the
Objects diagram with the relationships between them.
Show Columns Columns contained in the selected object are added or removed. In the
case of views, the tables columns that the view references also appear.
Show Constraints Table primary key, foreign keys, and check constraints are added or
removed.
Show Indexes Indexes of the selected table or database are added or removed.
Show Macros Macros of the selected database are added or removed.
Show Parameters Parameters of the selected stored procedure or macro are added or
removed.
Show Databases Databases of the selected database system are added or removed.
Show Stored Procedures Stored procedures of the selected database are added or removed.
Show Tables Tables referenced by the selected object are added or removed. This
action is available for databases (to show the tables it contains) and
objects that reference tables (such as views and macros).
Show Triggers Triggers referenced by the selected object are added or removed. This
action is available for databases (to show the triggers it contains),
tables (to show the triggers of the table), and columns (to show the
triggers that occur on updates to the selected column).
Show Stored Procedures Stored procedures referenced by the selected object are added or
removed. This action is available for databases (to show the stored
procedures it contains) and objects that reference stored procedures
(such as stored procedures and macros).
Show UDFs User-defined functions contained in the selected databases are added
or removed. (Currently user-defined functions are not indexed by
Meta Data Services so other references to them are not available.)
Show UDTs User-defined types contained in the selected database are added or
removed. (Currently user-defined types are not indexed by Meta Data
Services so other references to them are not available.)
Show Views Views referenced by the selected object are added or removed. This
action is available for databases (to show the views it contains) and
objects that reference views (such as stored procedures, views, and
macros).
Action Description
Show Referring Object Referring object is selected and scrolled into view if it is not already
visible.
Show Referred Object Object being referred is selected and scrolled into view if it is not
already visible.
Interdependency Printing
The Interdependency Browser diagram is compact. Elements of the diagram are moved around to
minimize the length of lines connecting the elements. There is no special arrangement to lay the diagram out
for printing. As a result, diagram elements might be split between multiple pages.
There are some printer drivers that don't handle the icons in the diagrams very well. If the icons don't appear
in the printed diagrams, check the printer's preferences to see if there is a setting that enables the printing of
the icons. For example, a printer driver that exhibits the problem has a setting to print in "Raster Mode."
Using this Raster Mode results in the icons being printed.
Macro Management
Creating a Macro
Macros are SQL statements that the server stores and executes. Macros provide an easy way to execute
frequently used SQL operations.
1. In the Navigator, expand the Databases, right-click a database or user, and click Show Macros.
A list of the macros defined in the connected system appears in the Object List Viewer. The list is filtered
according to any filters you have applied.
Dropping a Macro
1. In the Navigator, expand the Databases, right-click a database or user, and click Show Macros.
A list of the macros defined in the connected system appears in the Object List Viewer. The list is filtered
according to any filters you have applied.
2. In the Object List Viewer toolbar, select the macro you want to drop and click .
3. Click OK to confirm.
2. In the Object List Viewer toolbar, select the procedure you want to drop and click .
3. Click OK to confirm.
Creating a UDF
Teradata allows you to create UDFs to extend your SQL functionality.
1. In the Navigator, expand the Databases, right-click a database or user, and click Show User-Defined
Functions.
A list of the UDFs defined in the connected system appears in the Object List Viewer. The list is filtered
according to any filters you have applied.
2. In the Object List Viewer toolbar, select the UDF you want to drop and click .
3. Click OK to confirm.
Dropping a UDT
1. In the Navigator, expand the Databases, right-click a database or user, and click Show User-Defined
Types.
A list of the UDTs defined in the connected system appears in the Object List Viewer. The list is filtered
according to any filters you have applied.
2. In the Object List Viewer toolbar, select the UDT you want to drop and click .
3. Click OK to confirm.
Rights Management
Grant/Revoke Tab
Use this tab to select the trusted database users for which to set connect through rights.
Tabs Description
Trusted User Select the database user that you want proxy users to connect through.
Trust Only Check to grant connect through with trust-only option.
Grant Grant connect through privileges to application or permanent proxy users.
• Application Proxy Users tab - Grant privileges to an application user
(non-database defined) who is allowed to connect through the selected
trusted user.
• Permanent Proxy Users tab - Grant privileges to a permanent user
(database defined) who is allowed to connect through the selected
trusted user.
SQL Preview
Use the SQL Preview tab to preview the generated SQL statements submitted when you click Grant or
Revoke. The generated SQL updates whenever you move privilege items to the To be granted or To be
revoked list. You can save the SQL to a project by using the Save SQL option in the SQL Preview tab.
Display Tab
The Display tab shows a detailed grid of the current connect through privileges for the selected Trusted
User. You must select a database user from the Trusted User field to refresh the Details grid.
Revoke Tab
The Revoke tab shows the list of revocable connect through privileges for a trusted user and lets you specify
which privileges to revoke. You must click Revoke to revoke privileges on the trusted user you select. The
Revoke tab contains two lists:
List Description
Revocable Privileges Lists current revocable privileges on the selected trusted user.
To be Revoked Lists the privileges you selected to be revoked for trusted users.
You move privileges from the Revocable Privileges list to the To be Revoked list to indicate which
privileges are to be revoked for the selected trusted user.
1. In Revocable Privileges, review and then select the privileges to revoke on the trusted user you selected.
Use the Shift and Ctrl keys to select multiple privileges.
2. Move single or multiple privileges from the Revocable Privileges list to the To be Revoked list using the
directional arrows.
The single arrow moves a single privilege; the double arrow moves multiple privileges.
3. Click Revoke to revoke privileges on the trusted users listed in the To be Revoked list.
Option Description
Save SQL Saves the SQL statement to an SQL file in an existing project in your workspace. The
Save SQL dialog opens. Select a project folder and type a file name, then click OK.
Show in Editor Displays the SQL statement in the SQL Editor. The Connect Through Rights dialog
is not closed.
Logon Rights
The Logon Rights dialog enables you to grant, revoke, and display log-on privileges assigned to database
users. Access this option by right-clicking a user in the Data Source Explorer and selecting Teradata >
Grant/Revoke > Logon Rights.
Grant/Revoke Tab
Use this tab to select the trusted database users for which to set logon rights.
Option Description
All Users (Default) Selects to grant, revoke, or display log-on rights on All database users.
Specific Users(s) Selects to grant, revoke, or display log-on rights on specific database users.
The log-on rights granted or revoked on specific users take precedence over
the rights granted or revoked on all users (default).
View Details Updates the Grant, Revoke, and Display tabs with the log-on right details
based on selection of database objects.
Filter Host ID Views only those log-on rights on HostIDs you select from the Filter
Hostid combo box. Information for the selected HostIDs display in the
Grant, Revoke, and Display tabs.
Grant Tab Grant log-on privileges to all database users (default) or specific database
users.
Revoke Tab Revoke log-on privileges from database users.
Display Tab Display the current log-on privileges for the selected database user.
Null Password Select this if no password is required for the user to log on.
Display Tab
The Display tab contains a Details tab that displays the current privileges for the selected database object
when you click View Details.
Revoke Tab
The Revoke tab displays privileges you can revoke for the specified database user and HostID. To revoke a
privilege, move it to the To be revoked list and click Revoke. The Revoke tab contains two lists:
List Type Description
Revocable Privileges Lists current revocable privileges on the selected users.
To be Revoked Lists the privileges you selected to be revoked for selected users.
You move privileges from the Revocable Privileges list to the To be Revoked list to indicate which
privileges are to be revoked for the selected users.
1. In Revocable Privileges, review and then select the privileges to revoke on the users you selected.
Use the Shift and Ctrl keys to select multiple privileges.
2. Move single or multiple privileges from the Revocable Privileges list to the To be Revoked list using the
directional arrows.
The single arrow moves a single privilege; the double arrow moves multiple privileges.
3. Click Revoke to revoke privileges on the users listed in the To be Revoked list.
Grant Tab
The Grant tab displays privileges you can grant to the specified database user or object. The Grantable
Privileges list displays the current grantable privileges on the selected database object and HostId. To grant
a privilege, move it from Grantable Privileges to the To be granted list and click Grant.
1. In Grantable Privileges, review and then select the privileges to grant on objects you selected in the To/
From Objects section of the dialog.
Use the Shift and Ctrl keys to select multiple privileges.
2. Move single or multiple privileges from the Grantable Privileges list to the To be granted list using the
directional arrows.
The single arrow moves a single privilege; the double arrow moves multiple privileges.
3. [Optional] Under Options select Null Password if you want the database user to have a logon string
with no passwords be accepted from the specified host.
This option implies that the user has been authenticated externally and not by the database.
4. Preview the generated SQL statement in the SQL Preview tab and if necessary, repeat previous steps to
modify SQL.
5. Click Grant to submit SQL and grant privileges on the objects listed in the To be granted list.
Option Description
Save SQL Chooses a file in which to save the SQL.
Show In Editor Views the SQL in the SQL Editor. The Logon Rights dialog remains open.
Option Description
By User View rules grouped by users.
On Database View rules grouped by database.
On User View rules for a user.
2. Click Display to show the access logging rules.
3. Under Logging Rules, right-click any table header and select one of these actions:
Option Description
Select to Modify Types Selects list items in the Set Access Logging tab for further modification of
logging details.
Select All Selects all items in the list.
Copy Copies all selected items to a clipboard.
The Rules Report displays the access logging rules report for the selected criteria.
Option Description
Specific User(s) Creates an access logging rule that applies to specific users. Select a user from
the list. To select multiple users, use the Shift and Ctrl keys.
2. [Optional] Select Denials to create a rule that only applies when access is denied.
You can define two rules for the same user and object, but with different Denials settings.
3. [Optional] Select With SQL to record SQL statements in the access log.
4. Under Frequency select one of the following:
Option Description
First Logs only the first access by selected user(s) to the selected object.
Last Logs only the last access by selected user(s) to the selected object.
Each Logs every access by selected user(s) to the selected object.
First & Last Logs only the selected user(s) first and last access to the selected object.
5. Under On Object select one of the following:
Option Description
All Sets a rule that applies to all database and user objects.
Database Sets a rule that applies to objects on the selected database. Use the drop-down
list to select a database available for access logging.
User Sets a rule that applies to objects on the selected user. Use the drop-down list
to select a user available for access logging.
Authentication Sets a rule that applies to the selected authentication name. Use the drop-
down list to select a name.
6. [Optional] If you selected Database or User in the previous step, select Object Type to create or remove
an access logging rule for a specific object on the selected database or user.
a) Use the list to select the object type of the target object.
b) Use the second list to select the target object on which you want to create or remove the role.
7. [Optional] Select specific SQL statements to log.
You can manually select individual SQL statements or use the Select By options to group related SQL
statements to log.
a) Under Select By, select one or more of the following:
Option Description
All Selects all available commands for logging.
Dictionary Selects all available dictionary commands for access logging.
Create Selects all available create object rights for access logging; automatically
selected if you select Dictionary.
Drop Selects all available drop object rights for access logging; automatically
selected if you select Dictionary.
Access Selects all available access commands for access logging.
Option Description
Drop Selects all available maintenance commands for access logging.
b) Under Normal select from the list of basic SQL access statements to log.
c) Under Create select from the list of SQL CREATE statements to log.
d) Under Drop select the SQL DROP statements to log.
8. Click one of the following buttons:
Button Description
Begin Log Defines an access logging rule for the selected user(s), database, and object
(optional).
End Log Revokes an existing access logging rule for the selected user(s), database, and object
(optional).
Rule Type
Option Description
Application Name Views the existing query logging rules for applications.
All Users Views the existing query logging rules for All users.
Specific User(s) Views the existing query logging rules for specific users.
Display Displays the query logging rules for the selected criteria.
Modify Query Logging Enabled when you select Specific User(s). Select the selected list items in the Set
Query Logging tab to further modify logging details.
Select All Selects all items in the list.
Copy Copies all selected items to clipboard.
Logging Rules
Option Description
Rules Report Displays the query logging rules report for the selected criteria.
Rule Type
Option Description
Application Name Creates a rule by application name. Type the application name in the text box
located directly below the check box. You can also enter single or multiple
application names by separating names with a comma (,). This check box is
only available when connected to Teradata Database 13.00.00 and later.
All Users Creates a query logging rule that applies to all users. Type one or more
Account names, separated by commas. All users are restricted to logging on to
only those sessions for the specified accounts.
Specific User(s) Selects users from the list of all users in the database to create a query logging
rule for one or more users. Type one or more Account names, separated by
commas. All users are restricted to logging on to only those sessions for the
specified accounts.
Option Description
Mode Controls which CPU/IO collection algorithm Teradata Database uses for this
query logging rule.
What to Log
Option Description
No Logging Exempts one or more users from logging when these users would otherwise be
logged by a broader rule such as All Users or Account. This check box is only
available when connected to Teradata Database 13.00.00 and later.
Object Names References the names of the database objects (Tables, Views, and so forth.) in
the query to be saved to the DBQLObjTbl table.
Full SQL Text Saves the full SQL text to the DBQLSQLTbl table (besides what is specified in
the SQL Length field).
Step Information Logs the statistics for each execution step within the queries to the
DBQLStepTbl table.
Explain Text Saves the Explain text for the queries to the DBQLExplainTbl table.
Usercount Logs the user count for queries.
XML Plan Adds XML Plan information to the Query Log for later use by the DBQAT
products. Select the Verbose option if you want detailed information entered
in the log.
Statistics Usage Logs query statistics. If you want to log detailed statistics, select Detail.
Lock Logs information about query locks.
Everything Logs all possible options.
Limits
Option Description
SQL Length Limits the length of the SQL stored in the main query logging table:
DBQLLogTbl. The maximum length is 10,000 characters. If you do not select
this option, the Teradata Database logs the first 200 characters of the SQL.
Summary Logs only summary statistics for the executed queries. Enter 3 threshold values.
These values define thresholds (seconds) for query response time. They are
used to group queries into 4 'size' categories.
A count of the number of queries in each category is logged every 10 minutes.
For example: If the three threshold values entered are 5, 10 and 15, counts for
the queries that run between 0 and 5 seconds, 5 to 10 seconds, 10 to 15 seconds
and above 15 are logged.
Every 10 minutes, a DBQL object row is written for any count that is greater
than 0. For example, if 1 query ran under 5 seconds, 2 queries each ran 7
seconds, and 3 queries each ran over 15 seconds, 3 rows are written to the
Option Description
DBQL object table. When you select Summary, none of the other dialog
options apply.
Threshold Counts those queries that run in less than n seconds (in the summary record
written every 10 minutes). Queries that run longer than n seconds are logged
using the other settings.
Elapsed (sec) Specifies the content of the Summary and Threshold fields. Elapsed (sec) is
Elapsed (1/100) the default.
CPU Time
CPU (Normalized)
I/O Count
Move Space
The Move Space form enables you to move permanent space from one database to another.
Option Description
From Database Select a database from the list of databases defined in the system. Space from the
database you select is moved to the database you select in To Database.
To Database Select a database from the list of databases defined in the system. The database you
select in this list receives the space moved out of the database you selected in
From Database.
Bytes To Move Shows the bytes of space to move between the selected databases. The unit
denomination depends on whether the KB, MB, GB, or TB button has been
selected. You can change the value in the Bytes to Move field by typing the value,
clicking the up/down arrows to the right of the value, or by adjusting the
Percentage to Move slider (see below).
Percent to Move Provides an alternate way to specify the amount of space to move. The position of
the pointer shows the portion of the From Database free space to move to the
database specified in To Database. When you adjust the position of the slider, the
amount of space to move is shown in the Bytes to Move field.
Allocations Displays a table that shows the allocation of used and free space of the selected
databases. The values display in the units of the selected KB, MB, GB, or TB
button. The table shows both the used and free space for the to and from
databases, before and after the selected move is executed.
The message area at the top of the form indicates whether enough information is specified to move space
from one database to another. If not, a red X icon displays with a message explaining what must be done.
Click the Commit button to execute the contents of this property form.
Object Space
Every object has a certain amount space allocated to it, and can have one or more associated artifacts (an
artifact refers to an attached file or jar file). You can view information for an object by right-clicking it (in
the Object List Viewer) and selecting one of the following commands from the pop-up menu:
Command Description
Show Summary Object Space Total perm space allocated to a selected table. The Show Summary
Object Space command displays current perm space, peak perm space
and skew factor.
Show Object Space Total perm space allocated to the selected object. For a table, this is
shown per VProc. The Show Object Space command displays current
perm space, peak perm space, type, skew factor, creator name and
comment string.
Show Created Space Total perm space allocated to all objects created by the selected user.
The Show Created Space command displays current perm space, peak
perm space, type and create time.
Show Child Space Total perm space allocated to all children of the selected object. The
Show Child Space command displays current perm space, peak perm
space, type, skew factor, creator name and comment string.
Show Files List of all files associated with the selected object.
Show Jar Files List of all jar files associated with the selected object.
You can also view space information on the Database, User, and Table Property Forms.
Data Tools
Compare Objects
If you selected a database, user or table object to compare, and it has dependent objects you want to include
in the comparison, select these objects in the Compare Objects screen. If an object has no dependent
objects, the screen displays as blank.
Including dependent objects is an optional step. By default, the Compare SQL Object Wizard compares
only the object you select with the referenced object.
Dependent Objects
You can include dependent objects to be included in the comparison of database, user, and table objects.
When comparing database or user objects, the Compare SQL Object Wizard gives you the option to
include child databases and users, functions, hash and join indexes, macros, stored procedures, tables,
triggers, and views. If you are comparing tables, you can include dependent triggers in the DDL comparison.
The following is an example of the DDL text comparison for two table objects.
Referenced Object
The object you selected in the Data Source Explorer as the object to compare with another object. The
Compare SQL Objects Wizard presents only objects for comparison that are the same object type as
the referenced object. The DDL text for this object displays in the left pane of the Compare Editor.
Compared to Object
The object you selected in the Compare SQL Objects Wizard for comparison with the referenced
object. The DDL text for this object displays in the right pane of the Compare Editor.
Next and Previous Differences
The Next Difference and Previous Difference functions in the toolbar allow you to review the
differences between the two displayed objects in sequence of occurrence. The editor highlights the next
or previous difference as you review and compare the DDL text in the two object panes.
Next and Previous Change
The Next Change and Previous Change functions in the toolbar allow you to review element
changes in the two compared objects. The editor highlights the next or previous change as you review
and compare the DDL elements.
Option Description
Go to the beginning of the Moves the comparison position to the beginning of the element.
element
Display the next element Moves the comparison position to the next changed element.
Do nothing Retains your compare position at the end of the text.
Statistics
Option Description
Right-click menu options from Data Selects table columns or indexes from the Data Source
Source Explorer Explorer to add a column or index in the Statistics Collection
view by right-clicking and selecting Teradata > Statistics >
Collect.
Drag and drop to Statistics Collection Selects columns or indexes from the Data Source Explorer to
View drag and drop the selected items into the Statistics Collection
Objects view.
After you add statistics collection objects, you can manage the objects using the Collect, Add Multi-
Column, and Remove options.
Option Description
Collect Opens the Collect Statistics dialog which allows user to run the Collect
Statistics SQL command on the statistics collection objects added to the view.
Add Multi-Column Selects multiple columns from the statistics collection objects and creates a
multi-column statistic object.
Remove Selects single or multiple items from the statistics collection objects and
removes selected items.
Remove All Removes all items from the statistics collection objects.
These options are available for collecting statistics on columns, multi-column, and indexes. You can click
individual cells in the grid report to edit these values:
Option Description
Collection Displays the columns or index objects on which the statistics are collected. The
Objects collection objects are displayed using databasename.tablename.column or
databasename.tablename.index format.
Existing Statistics Displays a check mark when the collection objects already have statistics defined on
them
Partitioned Automatically selected if the column is partitioned. Select or clear the check box to
modify the partitioned column setting before running collect statistics SQL.
Option Description
Name The name of a Statistic. After a name is defined, the name can be used in other
operations such as DROP and SHOW STATISTICS. The naming of statistics is
particularly helpful for multi-column statistics.
Max Value Statistics Histogram records values such as min, max, mode and biased values. The
Length Max Value Length refers to the maximum value length that can be used to build these
values. If the value length is larger than the system-determined or specified maximum,
it gets truncated. Note that in prior releases of the Teradata Database 14.0, the
maximum value length could not exceed 16 bytes. Increase the maximum value length
for columns that require more detailed information in the histogram to improve
single-table predicate selectivity estimations. However, this should be done selectively
as needed as it increases the size of the histogram which can increase the query
optimization time.
Max Intervals Maximum number of intervals of a histogram can be customized using the Max
Interval option. If this option is not specified, the system uses a default maximum
number of intervals which is defined as 250. A greater number of intervals increases
the granularity of the data in the histogram and helps to get better single-table and join
selectivity estimations for non-uniform data. However, this should be done selectively
as needed (for columns involved in a predicate exhibiting over or under estimations) as
it increases the size of the histogram which can increase the query optimization time.
Sampling Allows users to customize sample percentage for different collection objects. This
makes system to scan a user-specified percentage of table rows. "n" denotes the sample
size of type integer or decimal which can range from 2 to 100. A sample size of 100 is
equivalent to collecting full statistics.
Threshold Allows users to skip statistics recollection based on amount of data change and/or on
the age of the statistics (if it is below the threshold in effect). The statistics recollection
is done if the age of the statistics is greater than or equal to the number of days
specified or/and if the percentage of change in the statistics exceeds the specified
threshold percentage.
These options are available for adding and removing collection objects:
Option Description
Remove By default all collection objects are marked for statistics collection. User can select
any of the collection objects and click on remove to deselect collection objects.
Add After any statistics objects are cleared from the collection, you can add them again by
clicking Add. This action opens a dialog to choose statistics objects that could be
added to the collection objects again.
Multi-Column Changes the column ordering for the multi-column statistics objects. You can select
Ordering any of the multi-column collection objects and click Multi-Column Ordering. This
opens a Modify Column Ordering dialog where you can use the Up and Down
buttons to change the ordering.
These options are available for previewing the collect statistics SQLs and running them:
Option Description
Next Previews the SQL that is generated automatically for collecting statistics on the
collection objects.
Finish Runs the SQL that are generated automatically for collecting statistics on the
collection objects.
Collecting Statistics
Collecting statistics on columns and indexes provides the Optimizer with data demographic information it
uses to generate efficient query plans that execute as quickly as possible.
1. Display the Query Development perspective.
2. In the Data Source Explorer, select the table columns and indexes for which you wish to collect
statistics.
You can select more than one column and index in more than one table by holding the Ctrl or Shift key
while you click.
3. Right-click a selected column or index, and click Teradata > Statistics > Collect.
The Statistics Collection view opens, listing the columns and indexes you selected.
4. [Optional] Select one or more of the items in the Statistics Collection Objects list and click Remove to
prevent statistics from being collected on those objects.
The items are removed from the Statistics Collection list.
5. [Optional] To create a multi-column statistic object, select one or more columns in the Statistics
Collection Objectslist and click Add Multi-Column.
A multi-column entry for the selected columns is added to the list.
6. Click Collect.
The Collect Statistics wizard opens.
7. [Optional] Click Options>> to expand the table to display statistic collection options and specify the
options you want for each object.
Tip: Hover your mouse over the Options cells for more information on each option.
8. Do one of the following:
• Click Next to inspect the SQL that will be issued to the connected database to start statistics
collection.
• Click Finish to collect the statistics.
Drop Statistics
The Drop Statistics dialog drops statistics on selected columns and indexes on which statistics are currently
defined. You can select either single or multiple objects to drop the statistics.
The Drop Statistics dialog is opened by selecting tables from the Data Source Explorer and right-click to
select Teradata > Statistics > Drop Statistics.
Use these options to drop statistics:
Option Description
Dropping statistics on a table If all columns and indexes of a table from the currently displayed
statistics objects are selected, the drop statistics process
automatically submits Drop statistics on table SQL.
Note:
The table summary statistics are deleted during this operation.
Dropping statistics on individual You can select either single or multiple statistics objects that are
columns or indexes displayed under each table object. Clicking OK starts the drop
statistics process on individual columns and indexes.
Dropping Statistics
Dropping statistics permanently removes statistical data that has already been collected for specified
columns and indexes of a table.
1. Open the Query Development perspective.
2. In the Data Source Explorer, select the tables or columns and indexes for which you wish to drop
statistics.
You can select more than one table or more than one column and index by holding the Ctrl or Shift key
while you click.
3. Right-click a selected object, and click Teradata > Statistics > Drop.
4. If you clicked one or more tables, the Drop Statistics dialog opens to allow you to select the column and
index statistics to drop. After you have selected, click OK.
5. In the Drop Statistics confirmation message dialog, click OK.
Filter Operations
The following filter operators are available options when creating a filter rule. Select the operator and specify
a value. For example, to filter data so that only values greater than 999 are shown, select the ( ) operator
and enter the value 999.
Option Description
None No filter rule. This is the default.
Equal to value
Aster Database
Note:
If your database administrator has granted ALL privileges on schema PUBLIC to users in the PUBLIC
role (default), users can by default create databases in any new databases you create, such as tables in the
PUBLIC schema in the new database. Creating one or more schemas in the database and granting or
denying appropriate privileges for users on those schemas can prevent this.
Here are some tips for managing the GRANT/DENY Users privileges for the databases you create.
Grant or Deny Privilege Admin Action
Grant access to the new database Grant at minimum the CONNECT privilege on the
database to users or roles.
Grant ability to create schemas in the new database Grant users at minimum the CREATE privilege on
the database.
Grant ability to create tables in the new database Grant users at minimum the CREATE privilege on
one of the schemas in the database.
Deny users the ability to create tables or objects in a Revoke the CREATE privilege on a database or
database schema for the user.
Granted Privileges
Restrictions on users to read and write to Aster databases are managed as follows:
• GRANT and REVOKE privileges that you set for a database object.
• GRANT privileges on database objects to one or more roles or individual users.
You can grant membership in a role to another role or user, and thus grant the rights and privileges assigned
to a role to its member roles and users.
Database Form
Use the Database form to specify a database object definition that can be used to create a new Aster database
or modify the privileges of an existing one.
Database Properties
Click the property option tabs in the left panel to view database properties, such as name, assigned
privileges, or generated DDL in the right panel.
• General — Specify the name of a new database. You can also specify the encoding standard to use.
• Privileges — Specify grant and revoke rights for this database. You must first create the database
before you can assign privileges for it.
• SQL — Review the generated CREATE DATABASE statement that is based on the selections you
made.
You must click Commit to create the database before you can assign privileges in the Privileges tab.
Note:
You can change any privilege you've set by returning to the Privileges tab and double-clicking a
privilege icon.
Schema Form
Use the Schema object form to create a new schema in an Aster Database.
Schema Properties
Click the property option tabs in the left panel to view schema properties, such as schema name,
assigned privileges, and generated SQL, in the right panel.
• General — Specify the name of a new schema.
• Privileges — Specify GRANT and REVOKE rights for the schema. You must create the schema
object before you can assign privileges.
• SQL — Review the CREATE SCHEMA statement that was generated based on the selections you
made.
You must execute the generated SQL by clicking Commit to create the schema object before you can assign
privileges.
1. In the Administration perspective, click an Aster connection and choose the Users category.
2. In the Object List Viewer toolbar, click .
3. In the Create User form, click General and type a Name for the new user.
4. Assign and confirm a password.
5. [Optional] Select Inherit so this user automatically inherits group privileges.
User Form
Use the User object form to specify a user definition that can be used to create a new Aster database user or
modify the roles and privileges of an existing one.
User Properties
Click the property option tabs in the left panel to view related user properties, such as user name and
password, assigned roles, and generated DDL, in the right panel.
• General — Specify the name of a new user. You must specify a user password.
• In Roles — Specify which roles to grant to this user. You must first create the user object before you
can assign roles for it.
• Object Privileges — Specify the level of privileges granted to this user for specific objects in the Aster
Database. You must first create the user object before you can assign privileges for it.
• SQL — Review the CREATE USER statement that was generated based on the selections you make.
You must execute the generated SQL by clicking Commit to create the user object before you can assign
roles or privileges.
Note:
You can change any privilege you've set by returning to the Privileges tab and double-clicking a
privilege icon.
Role Properties
Click the property option tabs in the left panel to view role properties, such as in role and membership
rights, in the right panel.
• General — Specify the name of a new role.
• In Roles — Specify which roles this role is a member of. You must create the role object before you
can define roles.
• Members Of Role — First select the Member Type (Users or Roles) and next add the users or roles
to be a member of this role by selecting the MEMBER or w/Admin check boxes. You must create the
role object before you can administer privileges for the role.
• Object Privileges — First select the object to which you want to grant rights by this role and next
specify the privileges to grant to this role by selecting the check boxes beside the object.
• SQL — Review the generated CREATE ROLE statement that is based on the property selections
made.
Be sure to commit your SQL role definition to create a new role or to save your changes to an existing role in
the Aster Database.
Note:
Regular (persistent) tables are only available for regular Aster database connections, not Aster Execution
Engine (Aster-on-Hadoop) connections.
• Analytic tables are not replicated, and do not survive a system restart.
• Analytic tables may be FACT or DIMENSION tables (non-replicated).
• Analytic tables do not support columnar storage.
• You can perform a logical backup and restore for analytic tables. Physical backup and restore are not
supported.
• You can create analytic tables as logically partitioned tables. This results in the entire table hierarchy
being analytic.
• Do not create analytic tables as parent/child tables with inheritance.
Note:
Several of the options available for tables created in a regular Aster database connection are not available
for tables created in an Aster Execution Engine (Aster-on-Hadoop) instance connections. Where there
are differences, they are noted in the steps below.
Option Description
Regular Regular or Persistent tables are persistent across sessions and transactions and
(persistent) continue to exist along with its data until the table is dropped. This type of table
survives system restarts, node changes, partition splitting, exports and loads,
backups, restores, and other types of operations. If data needs to persist longer than a
few days, consider using a Regular table.
Note:
This is the default for a regular Aster database connection, but is not available for
an Aster Execution Engine instance (Aster-on-Hadoop) table.
Analytic Analytic tables hold data across the span of several transactions, sessions, or days.
Use Analytic tables only for derived data and never for original source data. Analytic
tables are not replicated, and do not survive a system restart.
7. [Optional] Select the Table Type:
Option Description
Fact A single, large table that records raw data as facts, such as measurements or metrics for a
specific event. Fact tables typically contain numeric values and foreign keys to
dimensional data stored in other tables. A fact table is always a distributed table. This is
the default.
Dimension A set of tables that contain values and descriptive attributes for data recorded in a fact
table. Dimension tables can be replicated or distributed.
Note:
If you selected Fact, you must open the Storage tab and in the Distribute by field, select the column
you want to be the key distribution column from the list.
8. Click Columns and for each column you add to the table, complete the following information:
a) Type the name of the new column in Column Name.
b) Select the Data Type.
c) In Length, type the maximum data length allowed for column data if appropriate for the selected
type.
d) Type the maximum Precision allowed for numeric column data.
The precision of a numeric is the total count of digits in the whole number (both sides of a
decimal). For example, the number 3068.443 has a precision of 7. The precision must be a positive
number.
e) Type the maximum Scale allowed for numeric column data.
The scale of a numeric is the count of decimal digits in the fractional part of the number to the right
of the decimal point. For example, the number 3068.443 has a scale of 3. The scale of an integer is
considered zero, therefore, scale can be zero or a positive number.
f) Select Null if data values in this column can be null.
g) Select Unique if data values in this column must be unique.
h) [Optional] Type a Default value if appropriate for the column type.
Note:
The Ascending and Nulls First selections determine the sorting order of the result rows in the
result column.
g) In WHERE insert the WHERE constraint expression for a partial index.
If the WHERE clause is present, a partial index is created that contains only that portion of the table
which is most useful for indexing.
10. [Optional] Click Constraints and for each constraint you Add, complete the following information:
a) Type a name for the constraint in the Constraint Name.
b) Select a Constraint Type.
UNIQUE and PRIMARY KEY constraint specifications consist of one or more column names.
CHECK constraints require that you specify the conditions of the check.
c) If you selected UNIQUE or PRIMARY KEY type, click Add beside the Index Members table,
thenselect one or more column names in the Columns section.
d) If you selected CHECK type, specify the check constraint condition in the Check Constraint
Condition section.
e) Review the Constraint Summary to ensure the constraint values you set are correct.
11. Click Storage.
a) In Distributed by, indicate how you want the data distributed for this table; default is
REPLICATION.
If you selected Fact as the Table Type in the General tab, you must select the column you want to
be the key distribution column . The options listed include the names of all columns identified in
the Column tab.
b) Select Storage by Row if you want the table data stored by the table row. For an Aster Execution
Engine (Aster-on-Hadoop) table, storage must be by row; there is no column storage.
If you do not select the check box, data storage is by column. However, for an Aster Execution
Engine (Aster-on-Hadoop) table, storage must be by row so this option is selected and cannot be
changed.
c) [Optional] In Compress, select the level of compression for an existing partition. This option is not
available for an Aster Execution Engine (Aster-on-Hadoop) table.
d) [Optional] In Inherits, accept the default value or type a different value.
Inherits indicates whether the table has an inheritance relationship with a parent table.
Table Form
Use the Table object form to specify a table definition that creates a new Aster schema table or modifies
privileges for an existing one.
Table Properties
Click the property option tabs in the left panel to view table properties, such as table and column names,
storage properties, privileges, and generated DDL, in the right panel.
• General — Specify the name of the new table.
• Columns — Specify at minimum one column in the new table.
You must execute the generated SQL by clicking Commit and create the table before you can assign
privileges.
Fact Table
A fact table is a single, large table that records business process data as facts, such as measurements or
metrics for a specific event. Fact tables typically contain numeric values and foreign keys to the
dimensional data stored in other tables.
Fact tables contain two types of columns: fact columns and foreign key columns. In Aster Database, you
must declare a distribution key column for each fact table using the Distribute by (DISTRIBUTED BY
HASH) field in the Storage tab of the Table object form in Object List Viewer. The selection you make
tells Aster Database how to physically distribute the table data across v-workers. A fact table is always a
distributed table.
Dimension Table
A dimension table is a set of tables that contain the domains of values that describe attributes for the
events and factual data recorded in a fact table. Each dimension table contains a set of values for a
specific dimension. For example, a customer contact table would contain detailed information about
each customer such as customer _id, name, phone, address, and other information. A dimension table
can be a distributed table or a replicated table.
Most dimension tables are replicated in Aster Database with a copy on every node in the cluster.
Optionally, you can specify your dimension table as distributed by (DISTRIBUTE BY HASH) by
declaring a distribution key column in the Distribute by field in the Storage tab of the Table object
form in Object List Viewer. This option distributes the table across nodes using the distribution key
you specify, instead of replicating the table on every node. In Aster Database a replicated table is by
definition a dimension table.
Note:
You can change any privilege you've set by returning to the Privileges tab and double-clicking a
privilege icon.
View Form
Use the View object form to specify a view definition that can be used to create a new view object or modify
the privileges of an existing one.
View Properties
Click the property option tabs in the left panel to display the view properties, such as view name and
generated DDL statement, in the right panel.
• General — Specify the name of a new view.
• View Query — Specify the SELECT statement for the view.
• Privileges — Specify the level of privileges granted for this view. You must create the view object
before you can assign privileges.
• SQL — Review the CREATE VIEW statement that was generated based on the selections you made.
You must execute the generated SQL by clicking Commit to create the view object before you can assign
privileges.
DDL Management
Note:
The Copy Wizard is not provided in Teradata Studio Express.
1. Open the Data Source Explorer and navigate to the table object to copy to the Data Lab View.
2. Drag the table object to the Data Lab View and drop it on the parent data lab group.
3. In Copy Table verify the Source and Destination information is correct.
4. If the table does not exist in the data lab group, select from these options:
Option Description
Copy Data Copies the source table data to the data lab table. To create a new table that is empty, de-
select this option. If the target table exists, select to append or replace the data in the
Data Lab.
Lock Table Locks the table during the copy operation. Locking tables might cause performance to be
slow.
5. If the table already exists in the data lab group, select from these options:
Option Description
Lock Table Locks the table during the copy operation.
Append to Existing Data Appends the source table data to the end of the data in the destination
table.
Replace Existing Data Replaces all existing data in the data lab table with the source table data.
6. Click Next.
Note:
The Copy Wizard is not provided in Teradata Studio Express.
Using the wizard you can specify data filters to determine which columns and data to copy to the Data Lab.
You can also lock the table while you are transferring data using the Lock Table option.
The Copy Wizard displays the following dialogs:
Dialog Name Description
Copy Table Displays the database and table name of the data source and destination.
Use this screen to verify that the copy information is correct.
If you are copying to a new table, you can select the Copy Data option to
copy the data when the new destination table is created. Clear this option
to create an empty table.
If you are copying to an existing table in the Data Lab, you must specify
whether you want the data appended to the existing data or to replace all
existing data with the source table data.
Filter Table Enables you to select which columns in the source table to copy to the
Data Lab table. After you select a column, you can refine the copy
operation by specifying which data in that column to copy. The default is
to transfer all data.
SQL Preview Filter Table Displays the generated Data Definition Language (DDL) script that
copies the source table to Data Lab. The copy job can be run by clicking
Finish.
Source Database
The source information includes the names of the Connection Profile, Database, and Table from
which the data is copied.
Destination Database
The destination information includes the names of the Connection Profile, Database, and Table to
which the Copy Wizard copies the data.
Instructions for Copy Job
You can specify these options for the Copy job:
Option Description
Copy Data Creates the destination table and copies the source data to the new
table. If you want to create an empty table, do not select this option.
Lock Table Locks source and destination tables during the data transfer.
Column Filter
Lists filter types available. You must enter a value that is valid for the column data type. The data type
displays beside the column name.
Column Select for Copy
Allows you to select a check box beside a column name to copy the column to the destination table. All
columns are selected by default.
Actions on All Columns
Allows you to perform actions on all columns at the same time. All columns are selected by default. Use
the Clear All and Select All buttons to act on all columns in the table.
also open the SQL Editor by clicking in the Query Development perspective.
General Tab
You can specify the following general preference settings:
Note:
Disabling validation also disables portability checking and the
Outline view.
Portability check target Selects the Teradata database type to use as the standard target for
portability checks. You must enable syntax validation to select a
portability target. Select None to indicate no database type for
portability checks (default).
Each line that is not portable to the target is annotated with a check.
You can display additional information by placing the cursor over
the marker.
Maximum number of lines Specifies the maximum number of lines of SQL content to validate
before disabling syntax validation. Select a number that optimizes
validation without impacting editor performance. The default is
1000. Clear the check box to indicate no restriction to the number of
lines of SQL to validate.
Prompt to disable system Displays a message asking if you want to disable system validation.
validation when content The message displays if the number of lines in the SQL file exceeds
exceeds maximum number of the value entered in Maximum number of lines.
lines
Show detailed annotation When selected enables the SQL Editor to display the list of possible
information correct syntax options when a syntax error occurs in the SQL
statement.
Option Description
Close single quotes Inserts characters to close a single quote in the SQL Editor.
Close double quotes Inserts characters to close a double quote in the SQL Editor.
Close parentheses Inserts characters to close a parentheses in the SQL Editor.
Close comments Inserts characters to close multi-line comments in the SQL Editor. For
example, if you type /* to indicate the start of a comment, the editor
inserts */ to close the comment.
Begin-End Adds the End with proper indentation in the SQL Editor, and then
moves the cursor to a new line between Begin/End with proper
indentation.
Connection Profile
Select a Connection Profile from the list. If the selected profile is not connected, confirm you want to
connect by clicking Yes, enter the connection password, and click OK.
Connection Status
Shows the status of the connection to the selected Connection Profile. Green indicates that the
connection is active.
Autocommit Toggle
When selected, submits each SQL statement in autocommit mode. Each SQL statement is then executed
in its own transaction that ends with a COMMIT statement. You cannot roll back an SQL statement that
SQL Handling
Common
The Results Handler options enable you to select a result set handler to process SQL result sets.
Option Description
Qualify names for drag and drop in SQL Editor (Default) Clear this check box if you do not want
names qualified when you drag and drop objects
from the Data Source Explorer to the SQL Editor.
Prompt for notes Check this check box if you want to be prompted to
enter SQL execution notes. When you execute SQL
statements, a dialog appears which prompts you to
enter the note. The SQL History view displays your
note text in the Note column.
Auto-connect to profile when selected in SQL Select this check box to automatically connect to the
Editor selected profile within an instance of the SQL
Editor. (Default)
Results Handler Select one:
• Teradata Export Wizard (File Export) —
option handles result sets by exporting SQL to a
file using the Teradata Export Wizard .
• (Default) Teradata Result Set Viewer — option
displays SQL result sets in the Result Set Viewer.
Sampler Content Size Type a value for the sample content size. Default is
100.
Teradata
The following Large Value Handling settings enable you to set column size restrictions for creating BLOBs
and CLOBs in Teradata tables.
Option Description
Handle Binary/Byte columns as BLOBs if size > Specify the limits for creating BLOBs for large binary
values in results. Binary results are treated as BLOBs
when their column size is greater than the value you
enter. A value of zero specifies that all binary values
are treated as BLOBs. Default is 30.
Handle Character columns as CLOBs if size > Specify the limits for creating CLOBs for large
character values in SQL results. Character values in
results are treated as CLOBs when their column size
is greater than the value you enter. A value of zero
specifies that all character values are treated as
CLOBs. Default is 16384.
Option Description
Handle Binary/Byte columns as BLOBs if size > Specify the limits for creating BLOBs for binary
results. Binary results are treated as BLOBs when
their column size is greater than the value you enter.
A value of zero specifies that all binary values are
treated as BLOBs. Default is 30.
Handle Character columns as CLOBs if size > Specify the limits for creating CLOBs for results.
Character values in results are treated as CLOBs
when their column size is greater than the value you
enter. A value of zero specifies that all character
values are treated as CLOBs. Default is 2147483647.
Sounds
The Sounds settings enable you to customize audible indicators for success and failure notification sounds
during SQL execution.
Option Description
Success Sound Select one of these options:
• No sound (default)
• System Beep
• Secret Sound
If you select Secret Sound, click Browse to select a
sound file on your system.
Failure Sound Select one of these options:
• Success Sound
• No sound (default)
• System Beep
• Secret Sound
If you select Secret Sound, click Browse to select a
sound file on your system.
BLOB Disposition
The BLOB Disposition form appears in the LOB Disposition Dialog when the results contain columns with
large binary values. The form contains the following fields:
Field Description
Column Name View the name of the column in the results.
Save to File Saves the values of the column to files. When this check box is cleared the fields
for specifying the name and location of files are unavailable.
Field Description
Display images in Displays the values that can be decoded as images in the result view as images.
Result View
Location Enter the name of the folder where the files are to be saved.
Browse Click to display a dialog box that allows you to browse for the Location.
File Base Name This is the main component of the name of the files that are created for the large
objects. The final name consists of the base name, the number of the row in the
results that contains the value, and the File Extension.
File Extension File extension component of the name of the files that are created for the large
objects.
CLOB Disposition
The CLOB Disposition form appears in the LOB Disposition Dialog when the results contain columns with
large character values. The form contains the following fields:
Field Description
Column Name View the name of the column in the results. This field can not be modified.
Save to File Saves the values of the column. When this check box is cleared, the fields for
specifying the name and location of files are unavailable.
Location Type the name of the folder where the files are to be saved.
Browse Click to browse for the folder to be the Location value.
File Base Name Base name to give to the files created for the large objects. The final name
consists of the base name, the number of the row in the results that contains the
value and the File Extension.
File Extension File extension to give to the files created for the large objects.
File Encoding Name of the encoding to use when the character values are written to the files.
LOB Disposition
The LOB Disposition dialog appears when the results of running an SQL statement contain CHARACTER
LARGE OBJECT (CLOB) or BINARY LARGE OBJECT (BLOB) values, or character or binary values
specified to be treated as large objects.
The dialog contains a form for each column of the results that is a large object type. The forms enable you to
specify how to handle the values. You can specify to store the values in files. In the case of binary data, you
can specify that the values that are images are displayed in the Result View.
The forms for specifying how the values are to be handled are:
• CLOB disposition: Specify the handling of large character values
• BLOB disposition: Specify the handling of large binary values
As you enter values in the forms, the message at the top of the dialog indicates if there is an invalid value.
When a form contains an invalid value the OK is disabled.
Note:
A value of zero specifies that all binary values are handled as BLOBs.
b) In Handle Character columns as CLOBs if size >, type the number of characters which when
exceeded, the object is handled as a character large object (CLOB).
The default is 2147483647.
Note:
A value of zero specifies that all character values are handled as CLOBs.
6. Click the Aster tab to set large value handling rules in Aster databases.
a) In Handle Binary/Byte columns as BLOBs if size >, type the number of bytes for column size
which when exceeded, the object is handled as a binary large object (BLOB).
Note:
A value of zero specifies that all binary values are handled as BLOBs.
b) In Handle Character columns as CLOBs if size >, type the number of characters which when
exceeded, the object is handled as a character large object (CLOB).
The default is 2147483647.
Note:
A value of 0 (zero) specifies that all character values are handled as CLOBs.
7. [Optional] To clear selections and restore default settings, click Restore Defaults.
8. To apply your changes, click Apply.
9. Click OK to apply your changes and close the Preferences dialog.
Execute SQL
The SQL Editor provides various options to execute SQL statements within an SQL file. To access the
following options, click the appropriate button in the toolbar or right-click inside the SQL Editor text area.
Running SQL
Teradata Studio has the following ways to run SQL operations on your Teradata systems:
• The SQL Editor provides the ability to define and run SQL statements. See the Using the SQL Editor
topic for details of how to run SQL statements from the SQL Editor.
• Run Configurations let you define operations that you can run from the Run menu and Run toolbar
button. See the Running SQL from Run Menu and Toolbar topic for details of how to specify run
configurations and how to run them.
• Running database objects - Several types of objects can be "run" in from the Data Source Explorer. See
the following section for details.
For Select
Hadoop File System Hadoop > SELECT Statement
4. In the SQL Editor, review the generated SELECT statement and edit as needed.
5. Click to execute the SELECT statement to retrieve the row in the table.
For Select
Teradata Database Teradata > Generate SQL > INSERT (Values) Statement
Aster Database Aster > Generate SQL > INSERT (Values) Statement
4. In the SQL Editor, modify the generated INSERT statement to specify the values for the columns based
on data types.
5. Click to execute the INSERT statement to insert the row into the table.
Parameterized Queries
SQL statements can contain parameter placeholders (question marks) in most cases where you can specify
constants. When you run SQL that contains one or more parameter placeholders from the SQL Editor, you
are prompted to specify the values for each of the parameters. The values you specify are substituted for the
parameter placeholders when the SQL executes.
Named Parameters
A special SQL element in the SQL Editor enables you to assign names to parameter placeholders. The form
of the new element is: ?\name
This form follows the rules of forming unquoted names which is a question mark followed by a back slash
followed by a name with no space between the parts.
Parameters that are specified without a name, that is, by using just the question mark alone, display with the
name "Parameter n" where the n indicates the index of the parameter for the SQL value.
For character string or binary columns, the Configure Parameters dialog provides a From File option
which reads the input value from a file. To specify the input file, select the cell ellipsis (...) and display a
dialog in which you can specify the input file.
For Select
Teradata Database Teradata > Generate SQL > UPDATE Statement
Aster Database Aster > Generate SQL > UPDATE Statement
4. In the SQL Editor, review the generated UPDATE statement and optionally add conditions to the
WHERE clause to update rows.
5. Click to execute the UPDATE statement and update the row in the table.
For Select
Teradata Database Teradata > Generate SQL > DELETE Statement
Aster Database Aster > Generate SQL > DELETE Statement
4. In the SQL Editor, review the generated DELETE statement and optionally add conditions to the
WHERE clause to delete rows.
5. Click to execute the DELETE statement and delete the row in the table.
5. Select a function in the Templates View and preview the script text in the Preview area below the view.
6. Drag and drop the selected Aster function into the SQL Editor to insert it.
The text for the Aster analytical function displays at the point you drop it in the SQL Editor script.
7. Substitute your values for the template variables and execute the script.
Note:
You must have a Connection Profile assigned for the SQL file.
Note:
Some syntactic variations might exist between Teradata SQL syntax and the SQL syntax that the Eclipse
DTP SQL Query Builder supports; consequently, some SQL Query Builder features might not work with
Teradata SQL syntax. For example, Teradata allows for abbreviated keywords such as "sel" for "select", or
"ins" for "insert", which the DTP SQL syntax does not support.
Note:
Also, if multiple SQL statements exist in the file, SQL Query Builder uses the first statement and ignores
the rest. It also does not handle nested SELECT statements. The Teradata SQL Query Builder supports
four types of SQL statements:
SQL Statement Type Description
SELECT Creates a SELECT statement to retrieve data from a database and displays the
result set in a table format.
INSERT Creates an INSERT statement to insert rows into the table.
UPDATE Creates an UPDATE statement to update data in a table.
DELETE Creates a DELETE statement to remove data from a specified table.
The SQL Query Builder provides tabs to edit the Columns, Conditions, Groups and Group Conditions.
Right-clicking the graphical area background provides options to add tables or create joins. Right-clicking a
table provides options to add a table, create a join, replace a table, select all columns, deselect all columns,
update an alias, and remove a table. You can also drag table objects from the Data Source Explorer and
drop them in the graphical display of the SQL Query Builder to easily add tables to your SQL statement.
The SQL Query Builder can also be launched from the SQL Editor context menu by selecting a SQL
statement then choosing the option Edit in SQL Query Builder. The SQL Query Builder displays the SQL
statement as well as a graphical view of the tables, columns, and table joins.
Note:
If you select an existing statement to edit in the SQL Query Builder, make sure that the tables are
qualified with the database name or that the designated database from the Connection Profile is the
database involved in the SQL statement. Otherwise the SQL Query Builder does not recognize the
columns and table joins for the graphical display. Also, if you perform a "SELECT *", the columns are not
selected (checked) in the graphical view of the table. Only columns specifically named in the query are
selected (checked) in the graphical view of the table.
Show SQL Click to open a dialog that displays the SQL statement.
Set Focus Click to set the focus to the associated SQL editor.
Rename Result Click to open a dialog that allows you to rename the result tab.
Tab
Text or Grid Click to switch the view of the result set data between grid or text.
Display The default is grid.
Format Selected Click to open the platform specific Font dialog which enables you
Cells to select the font, size, and color (on most platforms) of the selected
cells.
Pin Result Set Click to pin the result set. Pinned result sets are not closed by the
Clear All action. Pinned result sets must be closed manually.
Clear All Click to clear all result sets in the Viewer.
Save Click to save the result set data to a file within the workspace. The
Eclipse Save Result dialog appears, which allows you to select the
project, file name, file type, and export options.
Export Click to export the result set data to an external file. The Eclipse
Export Result dialog appears, which allows you to select the file
name, format, and export options.
Print Click to print the result set data. The Eclipse Print dialog appears,
which allows you to select the printer, page range, and number of
copies.
Show SQL Click to open a dialog that displays the SQL statement.
Rename Result Click to open a dialog that allows you to rename the result tab.
Tab
Rename Group Select one of the group result tabs while in Tab display mode.
Result Tab Right- click the tab and select the Rename Group Result tab menu
option.
Text or Grid Click to switch the view of the result set data between grid or text.
Display The default is grid.
Sash or Tab Click to switch the display of the multiple result sets between a tab
Display folder or side-by-side sash framework. The default is tab folder.
You can remove a result set from the sash framework by clicking
the .
Note:
When result sets are displayed in a sash framework, you can not
select a single result set for export, save, or print options.
Pin Result Set Click to pin the result set. Pinned result sets are not closed by the
Clear All action. Pinned result sets must be closed manually.
Refresh Result Set Click to refresh all of the removed result sets.
List
Save Click to open to the Eclipse Save Result dialog which allows you to
select the project, file name, file type, and export options and save
the selected result set to a file within the workspace.
Note:
This option is unavailable when result sets are displayed in the
sash framework.
Save All Click to open the Eclipse Save Result dialog which allows you to
select the project, file name, file type, and export options and save
all of the result sets to a file within the workspace. This option is
enabled when you execute multiple SQL statements in a single
execution, using the following SQL Editor menu options: Execute
All, Execute Select Text (and more than one SQL statement is
selected), or Execute Selected Text as One Statement.
Export Click to open the Eclipse Export Result dialog which allows you to
select the file name, format, and export options and export the
selected result set to an external file. This option is unavailable
when result sets are displayed in the sash framework.
Export All Click to open the Eclipse Export Result dialog which enables you
to select the file name, format, and export options and export all of
Show All Click to show all columns. Previously hidden columns are also
Columns shown.
Select Column Click to select the entire column.
Auto resize Click to resize the column to fit the largest cell.
column
Auto resize row Click to resize the row to fit the largest cell.
Rename column Click to rename the column header.
Find Next Click to find the next match value in the result set data.
Find Next Reverse Click to find the next match value in the result set data in the
reverse direction.
Aggregates Click to compute aggregates for the selected column values.
Freeze column Click to freeze scrolling at the selected column. All columns to the
left are displayed. All columns to the right are scrolled. To unfreeze,
click again.
Find Next Click to find the next match value in the result set data.
Other Actions:
Option Description
Sort Column Click the column header. An arrow appears indicated the direction of the sort,
ascending or descending order. Clicking a third time returns the column back to its
original order.
Move Column Select a column and drag it just past the new position.
Long Text Display If a cell contains text that exceeds the length specified by the Long Text Boundary
Size in the Result Set Viewer Preference, only the first 20 characters of the text is
displayed. Double-click the data to display the full text.
LOB Display When a result set contains CLOBs (Character Large Objects) or BLOBs (Binary
Large Objects), a dialog appears that enables you to indicate whether to save the
LOB to a file and the file location, as well as whether to display images in the Result
View.
Option Description
Display alternate Result Set Displays color in alternate rows of the result set. Click the color box to
rows in color open the Color dialog and select a basic color or define a custom color
to use.
Show Row Numbers Displays row numbers. This option is enabled by default.
Option Description
Show Column Headers Displays column headers. This option is enabled by default.
Show Table Grid Lines Displays lines between rows and columns on the table grid. This option
is enabled by default.
(*) Display Column Titles Displays the column titles (if available) rather than the column names,
rather than Column Names in the column header area. This option is disabled by default. The query
must be rerun in order for a change to this option to take effect.
(*) Max Display Row Count Changes the maximum number of rows to display. The default for this
option is 2000. The query must be rerun in order for a change to this
option to take effect.
Long Text Boundary Size Changes the long text boundary size. If a data value length is longer than
the long text boundary size, only the first 20 characters are displayed.
The user can view the entire data value by double-clicking the data in
the display grid. A pop-up window is presented with the full data value.
The default for this option is 150.
Display Negative Numbers in Displays negative numbers in red. This option is enabled by default.
Red
Reuse Result Set Viewer Causes the Result Set Viewer to refresh the current window with new
Window result sets generated by the SQL Editor. If you deselect the box, the
Result Set Viewer creates a new window for each generated result set.
Option Description
Display Null Value as Changes the value that is displayed when the data is null. The default for
this options is "null."
Display 1000 Separator in Displays a 1000 separator in numeric columns. This option is disabled
Numeric Columns by default.
Number Fractional Digits Designates the number of decimal places to display for Float values. By
Displayed default, the value is blank and the data is presented as returned from the
database. Set the value between 1 and 10 to change the number of
fractional digits displayed.
Display Dashes between Bytes Displays a dash between each byte of the value for greater ease of
for Binary Data Values reading, for example: 63-b1-a3-62. This option is enabled by default.
Display Float Values using Displays Float values using scientific notation rather than in decimal
Scientific Notation format. This option is disabled by default.
Display Time/Timestamp Displays the time/timestamp without indicating the time zone. For
without Time Zone example, instead of 11:37:58.123+02.00 this Results Set Viewer
would show 11:37:58.123. This option is disabled by default.
Display Date Format Select the format in which you want dates to be displayed. This option
uses the Java Simple Date Format notation to format the date display in
the result set. The default for this option is yyyy-MM-dd. You can select
Option Description
User Defined if you want to enter a format in the Date Format
Value box.
Date Format Value Shows the notation used to display date formats, based on the selection
in the Display Date Format drop-down list and enables you to enter a
format if you selected User Defined.
Option Description
Delimiter Format Changes the column delimiter when the Copy data option is used on the
grid display. The default for this option is Comma Separated. Other
possible choices are Tab Separated and User Defined.
Delimiter Value Changes the column delimiter value when the User Defined format
option is selected.
Copy Include Column Headers Select to include column headers when the copy data option is used on
the grid display.
Copy Include Grid Lines Select to include cell borders when you use the Copy data option to
copy cells from the grid display.
Option Description
Display alternate Select the check box to display color in alternate rows of the result set. Click
Result Set rows in the color box to open the Color dialog and select a basic color or define a
color custom color to use. This option is disabled by default.
Show Row Numbers Select to show row numbers in the grid display. This option is enabled by
default.
Show Column Headers Select to show column headers in the grid display. This option is enabled by
default.
Show Table Grid Lines Select to display lines between rows and columns in table grid display. This
option is enabled by default.
(*) Display Column Select to display column titles (if available) instead of column names as labels
Titles rather than in column headers. This option is disabled by default.
Column Names
Note:
You must rerun the query for these changes to take effect.
Long Text Boundary Enter the number of characters that will be displayed. The default for this
Size option is 150.
Display Negative Select to enable display of negative numbers in red. This option is enabled by
Numbers in Red default.
Reuse Result Set Select to refresh the current window with new result sets generated by the
Viewer Window SQL Editor. If deselected, the Result Set Viewer creates a new window for
each result set generated.
5. In the Data Format tab, select the following options as appropriate:
Option Description
Display Null value as Specify the value or string you want displayed when a value results in an
empty set or zero value. The default value is null.
Display 1000 Select to display a 1000 separator in numeric columns. This option is disabled
Separator in Numeric by default.
Columns
Number Fractional Enter the number of decimal places to display for Float values. By default, the
Digits Displayed value is blank. The number must be between 1 and 10.
Display Dashes Select to display a dash between each byte of the value for greater ease of
between Bytes for reading, for example: 63-b1-a3-62. This option is enabled by default.
Binary Data Values
Display Float Values Select to display Float values using scientific notation rather than in decimal
using Scientific format. This option is disabled by default.
Notation
Display Time/ Select to display the time/timestamp without indicating the time zone. For
Timestamp without example, instead of 11:37:58.123+02.00 the Results Set Viewer would
Time Zone show 11:37:58.123. This option is disabled by default.
Display Date Format Specify the format to use to display the date in the result set. Default format is
yyyy-mm-dd. When you specify the format, you must use the Java
SimpleDateFormat notation to format the date.
Date Format Value If you selected User Defined for the Display Date Format option, enter the
format.
6. In the Copy Options tab, select the following options as appropriate:
Option Description
Delimiter Format Select how you want columns delimited when the Copy data option is used on the
grid display:
Copy Include Select to include column headers as delimited values when the Copy data option is
Column Headers used on the grid display.
Copy Include Select to include grid lines as delimited values when the Copy data option is used
Grid Lines on the grid display.
7. [Optional] To clear selections and restore default settings, click Restore Defaults.
8. To apply your changes, click Apply.
Note:
Clicking Apply or OK refreshes the current display of result sets in the Result Set Viewer to
correspond with your changes.
9. Click OK to apply your changes and close the Result Set Viewer Preferences dialog.
Results Preferences
The Results Preferences provide extended capabilities for exporting results.
Option Description
Excel Export Options Alternate Row Colors: — Select this check box to alternate row
background colors when exporting to Excel. Select a different background
color by clicking color. The default for this option is cleared.
Big Int/Decimal Format: — Select the output format for Big Integers and
Decimals. If you choose number, some precision may be lost. The default
for this option is String.
Success Sound Select the sound that is played when results are successfully loaded into the
Result Set Viewer. The default for this option is no sound.
No Sound: — Play no sound when results are successful.
System Beep: — Play a system beep when results are successful.
Select Sound: — Play a sound file of your choosing when results are
successful.
Sound File: — Choose a sound file to play when results are successful.
Failure Sound Select the sound that is played when results fail to load into the Result Set
Viewer. The default for this option is no sound.
Success Sound: — Play the same sound as successful results.
No Sound: — Play no sound when results failed.
System Beep: — Play a system beep when results failed.
Select Sound: — Play a sound file of your choosing when results failed.
Sound File: — Select the sound file to play when results fail.
Restore Defaults Restore the default values for the options.
Option Description
Apply Apply any option changes that have been made. This may cause a refresh of
the current result sets displayed in the Result Set Viewer.
OK Applies any option changes that you made and closes the preferences page.
This may cause a refresh of the current result sets displayed in the Result
Set Viewer.
Format History View Enables you to format the display. The platform
specific Font dialog displays to allow you to
select font, size, and color (on most platforms).
Sort multiple columns Opens a dialog for setting a multi-column sort.
Copy Row Copies the selected row(s). Rows are copied as text
and as HTML. The HTML display preserves the
column headers. The target to which you paste
determines whether text or HTML displays.
Copy Cells Copies the cell data to the clipboard.
Delete Row Deletes selected row(s) from the view and history
database.
Edit SQL Edits the SQL from a selected cell in the SQL
Statement column in an SQL Editor.
Edit Note Edits the note from a selected cell in the Note
column.
Reexecute statement Re-executes the SQL from the selected cell in the
SQL Statement column.
Toolbar
The SQL History toolbar contains actions and menus that help you manage the data in the history data
grid.
Numbered Rows
The first column contains numbers assigned to each rows in the data grid. The numbers start with 1 and
increment for each data entry. The numbers do not indicate a special ordering or structure to the history
data. Use them as an easy way to refer to rows in the grid. To select an entire row, click the number for
the row. You can then right-click and select an action to perform on that row. For example, you might
select several rows and then right-click to select Find to search for specific data in those rows.
Column Header Row
Actions
Click toolbar icons to perform tasks. You also can access actions from the menu drop-down ( ) at the
right-end of the toolbar.
Use the Minimize and Maximize icons at the far right to resize the SQL History view.
Cleanup History
The Cleanup History dialog enables you to delete SQL History records based on selected criteria
Option Description
Delete SQL History using a criteria Enables you to delete records based on the following
criteria:
• Date deletes records from the SQL History view
when the Timestamp column value is less than
the selected date.
• Source deletes records from the SQL History view
when the Source column matches the entered
value
• SQL Statement deletes records from the SQL
History view when the SQL Statement column is
a super set of the entered value.
• Notes deletes records from the SQL History view
when the Notes column is a super set of the
entered value.
• User ID deletes records from the SQL History
view when the User ID column matches the
entered value.
• Queries that failed deletes records from the SQL
History view when the query execution failed.
• Rows with empty Notes deletes records from the
SQL History view when the Notes column value
is empty.
Delete duplicate queries in SQL History Deletes duplicate SQL query records from the SQL
History view.
Compact unused disk space allocated by SQL Releases allocated disk space not used by the SQL
History History view. After the command executes, you
must restart the application to make the disk space
available.
Import History
The Import History dialog enables you to import history view items from either a previously exported XML
history file or from an SQL Assistant MDB or XML file.
Option Description
Source Type Select either an XML file created using the Export
history option or an SQL Assistant history MDB file.
File Name Enter the name of the file from which to import the
history items.
Browse Select a folder and file name.
Export History
The Export History dialog enables you to save SQL History view items to an XML file. You can select to
export all or specific items from the view.
Option Description
File Name Displays the name of the XML file to which history
entries are saved.
Browse Opens a dialog to select the location and file name of
an XML file on the file system.
History Filter All Saves all history view items to an XML file.
History Filter Selection Saves only selected row items. You can select single
or multiple rows from the history view.
Note:
The SYSUDTLIB database always shows in the filtered list.
5. When asked to confirm, click OK.
Note:
If you want to redo the filter results, click Revert in the toolbar, change the filter rules in the Data
Filter, and then click OK. You can repeat these steps as often as you like.
History Preferences
Exclude Options for History Database
Select one or more of these options to exclude in the Teradata SQL History database:
Option Description
Exclude Explain Statements Check this box to exclude EXPLAIN statements in the History
database.
Exclude Unsuccessful Queries Check this box to exclude unsuccessful queries from being
entered in the History database.
History Options
Option Description
Limit History View Rows Enter the maximum number of rows allowed to display in the
Teradata SQL History view.
Maximum Text Display Length Enter the maximum number of characters that can be
displayed in a row.
Derby Database Location Displays the location of the SQL history file. To change the
location, click Browse and navigate to the desired location.
limit is reached, Rows shows only how many rows matched the query
you submitted.
• Other databases — number of rows returned or changed. If you abort,
Rows shows only the number of rows returned.
Actions
Option Description
Apply Click to apply your changes.
Restore Defaults Click to return settings to default values.
OK Click to save your preference settings.
Find Object
Find Object
Find Object ( ) enables you to find a database object in the Data Source Explorer that matches a certain
text value. It begins the search from the point selected in the Data Source Explorer and returns the first
object whose name matches the text pattern.
Note:
The search is not case sensitive.
Find Next ( ) finds the next database object of the same object type that matches the text value, expands it,
and selects it in the Data Source Explorer.
Option Description
Search Value Specifies a value to search for. You can use the database 'LIKE' syntax to
provide a more expanded search. The 'LIKE' syntax includes a percent
sign ('%') and low line character ('_' ). The percent sign character
represents any string of zero or more arbitrary characters. The low line
character represents exactly one arbitrary character. For example, the
search value of 'emp%' finds the first object whose name starts with 'emp'.
Note:
You must use the backward slash character '\' as the escape character
when entering the special search characters, '\', '_', and '%', in your
search value. For example, 'emp\%' searches for the first object whose
name equals 'emp%'.
Object Type Selects the object type from the list of object types for which you want to
search.
Find Starts the search process.
Advanced Find Opens the Advanced Find dialog.
Reset Resets the Search Value to an empty field and the Object Type for the
selected location in the Data Source Explorer.
Finding Objects
You can search for database objects in the Data Source Explorer that have names that match a text string
you specify.
1. From the Data Source Explorer, right-click the database or user in which you want to search for an
object.
2. Click Teradata > Find Objects.
The Find Object dialog opens.
3. For Search Value Enter the exact name of the object you wish to find.
The search is case-insensitive.
If you know or wish to enter only a portion of the object name, click Advanced Find to open the
Advanced Find dialog where you can specify only a portion of the object name in your search criteria.
4. Use the Object Type list to specify the type of database object you are searching for.
If you wish to search more than one object type, click Advanced Find to open the Advanced Find
dialog where you can specify several types of objects to search.
5. Click Find.
• If you used the basic Find Object dialog box to search, the Data Source Explorer tree expands to
show you the first instance of an object it finds matching your criteria.
You can press F3 or right-click the Data Source Explorer tree and click Teradata > Find Next to
search for other objects that have the same name.
Option Description
List of Databases or If you opened Advanced Find Objects dialog from the Databases Folder, a
Connection Profiles list of databases for the given Connection Profile appears. If you opened the
available for the search Advanced Find Objects dialog from the Advanced Search button in the
simple Find Object dialog at the highest level in the Data Source Explorer,
the list of Connection Profiles appears.
You can use the arrows to move single selected items to or from the list of
objects to be searched. The double arrows allow you to move all available
objects to or from the list to be searched.
Search constraint The Find Objects feature uses the search constraint to build a search
pattern out of the search value and pass it on to the Teradata Dependency
Browser.
Note:
You must use the backward slash character '\' as the escape character
when entering the special search characters, '\', '_', and '%', in your search
pattern. The '_' (low line) character represents exactly one arbitrary
character. The '%' (percent sign) character represents any string of zero
or more arbitrary characters.
Option Description
Note:
Use the '\' as the escape character
when entering the special search
characters, '\', '_', and '%', in the
search pattern.
Find Results
The Find Results dialog provides a list of the objects found that matched the search pattern entered in the
Advanced Find Objects dialog. The list is displayed as a table grouped by object types and within each
object type category further grouped into details.
1. Set the startup string for the user who will be connecting to the Teradata system:
a) In the Administration perspective, double-click Databases and select the user in the Object List
Viewer.
b) Right-click the row for the user and select Open Database/User.
The property form for the user is displayed.
c) In the General tab, ensure that the Startup String field reads: set session character set
unicode pass through on;
If it is not already set, modify the user properties to include the startup string.
2. Add the RUNSTARTUP JDBC property for the connection:
a) In the Teradata JDBC Connection Properties step of the Connection Profile wizard, enter the
credentials for the user and Teradata Database 16.0 system you are connecting to.
b) Click the Add button next to JDBC Connection Properties.
c) In the Add JDBC Property dialog, select the RUNSTARTUP JDBC property, select the property
value ON, and click OK.
The new property is listed in the JDBC Connection Properties display box.
3. Set the font that supports displaying symbols such as emojis:
a) From the Window menu, select Preferences.
b) Expand General > Appearance and click Colors and Fonts.
c) Select Text Font, and click the Edit button.
d) In the Font dialog, select the Segoe UI Symbol font and click OK.
e) Click OK to close the Preferences dialog.
Toolbar
The Table Data Editor toolbar contains navigation aids and action buttons that help you manage, filter,
and edit data in a database table.
Column Header Row
The top row of the Table Data Editor shows the labels and data types for the table columns.
Numbered Row Column
You can show or hide the first column by setting your preference in the Table Data Editor Preference
dialog. The column shows row numbers for the table you are editing.
Toolbar
Use the toolbar to page to specific rows and to set the number of rows per page. You can also use the toolbar
to save, filter and sort, revert, export, and refresh data.
Actions on Columns
Right-click a column header and select an option in the list.
Option Description
Hide columns Hides a column from the Table Data grid. The column in which you
right-clicked to select this option is the column that is hidden. To undo
the hide, select Show all columns.
Show all columns Causes any hidden columns to re-display in the Table Data Editor.
Auto resize column Changes the column width back to the auto-set width.
Find/Replace Opens the Find/Replace dialog in which you can enter keywords to
search data.
Show Values Opens the Show Values dialog in which you can specify filter rules
and show only rows that meet those rules. To undo a Show Values
filter result, select Reset Show Values.
Reset Show Values Resets rows to the order that existed prior to the Show Values filtering
of the column data.
Option Description
Auto resize now Resizes rows back to the auto-set height.
Copy Copies one or more rows in the table for pasting to a data spreadsheet
file; for example, Microsoft Excel.
Insert Inserts a row in the table.
Revert Reverts the rows you select by undoing your changes to that row. You
are prompted to confirm the operation. Click OK to revert.
Delete Deletes the rows you select. Deleted rows are highlighted. To undo a
row deletion, select the row and next select Revert.
Select Rows for Export Selects rows for export by placing an Export icon in all selected
rows. The icon is aligned left in the first column of the row.
Clear Rows for Export Deselects rows for export. The change is indicated by the removal of
the Export icon in the first column of the row.
Clear All Selected Rows for Resets all rows previously selected for export. The Export icon is
Export the first column disappears.
Export Selected Rows Opens the Export Data dialog to export all data rows selected for
export. Rows selected for export are marked by an Export icon in
the first column.
Actions on Cells
Right-click a table cell and select an option from the list.
Option Description
Undo Undoes the last change.
Cut Removes the data from one or more selected table cells and retains for
pasting to a different cell.
Copy Copies data you want to paste to a data spreadsheet file; for example,
Microsoft Excel.
Paste Pastes data from the clipboard into selected table cell.
Delete Deletes the data in the cell.
Status Bar
The status bar at the bottom of the gird shows errors and Save status for the Table Data Editor.
Toolbar
The Table Data Editor toolbar contains navigation aids and action buttons that help you manage, find, and
edit the data in a database table.
Table Navigation
Use the following features to navigate to specific rows in a large table.
Option Description
Row Type the row number to display at the top of the table data grid. Use
the drop-down menu to select a recent row number.
of Shows the number of data rows in the table. You cannot edit this field.
Page Size Select the number of rows to include per page from the drop-down list.
For example, if you select 1000, the first page begins at 1, and the
second page begins at 1001. The default page size is 500.
Actions
Click toolbar icons to perform tasks.
Save Commits data changes to the database. You can view the
SQL DDL statement in the SQL Preview view before you
click the Save icon.
Filter by Edits Displays the Show Edits dialog.
SQL Preview Displays the SQL Preview dialog to view generated SQL.
Data Filter/Sort Displays the Data Filter dialog to specify filter and sort
data rules.
Export All Displays the Export Data Wizard which exports all data.
Use the Page Size field to specify the number of data rows you want included in a page.
To review data in a table, use the page arrow keys to move to the beginning or end of the table, or
incrementally forward or backward one page at a time.
Data Filter
The Data Filter dialog enables you to define data filters for the Table Data Editor. Use filtering to reduce
the number of rows loaded into the Table Data Editor and to display only data of interest. You can
determine which data displays by:
• Sorting column order
• Filtering on data values within columns
Filter Tab
Move column names from the Table Column list to the Sort Column list to indicate on which columns to
sort to display data in the Table Data grid.
Option Description
Column Names Lists names of columns in table.
Types Lists data type for each column in Column Names.
Select By Select a filter operator from the list and type a valid value or character
string. For example, if values in Column1 are type INTEGER, and you
Option Description
filter to display only rows greater than (>) 5999, the Table Data grid
refreshes to show all rows with the value 6000 or above.
Sort Tab
Use fields and radio buttons in this section to indicate how you want columns sorted.
Option Description
Table Columns Lists all columns by name in the table.
Ascending Orders the Table Columns list from the smallest or lowest to the
largest or higher value. For example, A to Z or 1 to 100.
Descending Orders the Table Columns list from the largest or higher value to the
smallest or lowest value. For example, Z to A or 100 to 1.
Sort Columns Lists one or more columns in the order on which to sort.
Up Select a column in the Sort Columns list and click Up to move it up in
the list order.
Down Select a column in the Sort Columns list and click Up to move it up in
the list order.
Actions
Use the action buttons at the bottom of the dialog to clear or save your settings.
Option Description
Clear All Click to revert all selections in the Select By column to the default
None.
OK Click to save your Filter and Sort settings.
Color Options
To control color, choose from these options:
Option Description
Display alternate Result Set Select the check box to enable an alternate row background color, and
rows in color then select the color. Click the color box to see color options.
Insert Selection Color Click the color box to select the background color for inserted data.
Update Selection Color Click the color box to select the background color for updated data.
Delete Selection Color Click the color box to select the background color for deleted data.
Editor Options
To set edit preferences, choose from these options:
Option Description
Show Row Numbers Select the check box to show numbered rows in the first column of the
data grid.
Display Filter Dialog Threshold Enter the number of table rows above which the Table Data Editor
(rows) presents the Data Filter dialog. Be sure to specify filters in the Table
Data Editor to reduce the number of data rows that display. The
default is 500000.
Transaction Commit Size (rows) Enter the number of data rows to batch in a single COMMIT
transaction. This number is the threshold at which the batch UPDATE
operation occurs. For example, if you set the threshold at 1000, the
operation batches 1000 data row updates in a single COMMIT
transaction. The default is 500.
Option Description
Copy Column Names when Select the check box to include column header labels when copying
Copying Rows data to a file.
Column Delimiter Select from the list the type of delimiter to use to separate data when
copying or pasting from the editor to a file, such as Microsoft EXCEL
or Notepad. Supported delimiters are: Tab (default), Comma,
Semicolon, and Space.
Option Description
Apply Click to apply your changes. You can preview results in the Table
Data Editor.
Restore Defaults Click to return to default values.
OK Click to save your preference settings.
You can undo an insertion by clicking in the toolbar. or right-clicking the row or in the Table Grid and
selecting Revert. If you want to revert more than one row at the same time, select multiple rows and click
Revert.
Option Description
Show Values Equal Type a numeric value to match against column data values that are equal to
with the value you enter.
Show Values Greater Type a numeric value to match against column data values that are greater
than than the value you enter.
Show Values Less than Type a numeric value to match against column data values that are less than
the value you enter.
5. To show values for the VARCHAR data type, select from these options:
You can undo a deletion by clicking in the toolbar or right-clicking the row and selecting Revert.
Reverting Edits
You can reset data to pre-edited values by clicking the Revert icon ( ) in the toolbar. When you revert
data, all unsaved changes are discarded, and any edited data is reset to its last saved value.
Option Description
Case Sensitive Select to find only case-exact matches.
Wrap Search Select this option if you want the search to return to the top of the column after it
reaches the bottom. If you do not select this option and begin your search in the middle
of a column, the search only does an incremental Find for half of the column and
stops.
6. Click to select an action:
Option Description
Find Click to perform an incremental find of the value you entered in Find above.
Replace Click to replace an incremental Find value with the value you entered in Replace above.
Replace All Click to replace all Find values at the same time.
7. Click Close to return to the Table Data Editor.
Find Replace
The Find Replace dialog lets you find specific data values in a table column and replace them with a
different value. You cannot replace values across columns in a table. You can:
• Search for specific data values in tables.
• Replace target values with new values.
• Replace all values at the same time or incrementally one by one.
Find/Replace Values
You specify a data value to find and which value you want to replace it by completing these fields:
Option Description
Find Type the data value you want to find. The data type must be consistent
with the data type of the selected column. To perform only a Find
operation, click Find at the bottom of the dialog. The Find operation
looks for the value in the data column in which you opened the Find/
Replace dialog.
Replace Type a data value to replace the value in Find. The data type must be
consistent with the column data type. To perform the Find/Replace
operation, click Replace at the bottom of the dialog.
Option Description
Case Sensitive Select to find only case-exact matches.
Wrap Search Select this option if you want the search to return to the top of the
column after it reaches the bottom. If you do not select this option and
begin your search in the middle of a column, the search only does an
incremental Find for half of the column and stops.
Actions
Select an action from these options to perform Find and Replace operations.
Option Description
Find Click to perform an incremental find of the value you entered in Find
above.
Replace Click to replace an incremental Find value with the value you entered
in Replace above.
Replace All Click to replace all Find values at the same time.
Close Click to return to the Table Data Editor.
1. With an edited table open in the Table Data grid, click the Filter by Edits icon in the toolbar.
The Show Edits dialog opens.
2. Select which type of edit to display by checking one or more of these options:
a) Select the Inserts check box to display any rows with newly inserted data in the table.
b) Select the Updates check box to display rows in which data has been added, edited, revised, or
deleted.
c) Select the Deletes check box to display rows removed from the table.
3. Click OK.
The Table Data Editor refreshes to show only table rows that match the filter options you selected.
Note:
You can view, import, and export data larger than 64k, but you cannot edit the data. Imported data
that is larger than 64k is identified by its filename in the editor.
Slidebars
The data in an object is often more than can be displayed within the editing area. Use the slidebars on
each side of the workarea to scroll through data.
Blob Editor
The BLOB Editor displays the binary data contained in the selected Binary Large Object (BLOB) stored in a
database.
You can edit the data in the BLOB by:
• Inserting binary data
• Deleting binary data
• Clearing the binary data in the object
• Importing binary data from a file
• Exporting the binary data in the object
Option Description
File If data is imported, shows the name of the import source file.
Editor Workarea Displays the binary data in the selected object.
Actions
Use the action buttons to the right of the editor to import, export, or clear binary data.
Option Description
Import Click to import binary data from a file.
Export Click to export the binary data displayed in the editor to a file, such as
a binary data file.
Clear Click to remove all data displayed in the editor workarea.
OK Click to save the data to the object.
Note:
CLOB data larger than 64k can be viewed, exported, and imported, but not edited in the Clob Editor.
To edit files larger than 64k, export to a text editor.
Slidebars
The data in an object is often more than can be displayed within the editing area. Use the slidebars on
each side of the Edit workarea to scroll through data.
Clob Editor
The Clob Editor displays the character data contained in the selected Character Large Object (CLOB) stored
in a database.
You can edit the data in the CLOB by:
• Inserting character data
• Deleting character data
• Clearing the character data in the object
• Importing character data from a file
• Exporting the character data in the object
A CLOB data object can be represented in one of three ways:
• CLOB handle - Handle to the CLOB data in the database.
• Snippet of data - Text snippet you edit or insert in cell.
• Filename - For data objects over 64k, name of file that contains the data. You can edit or insert data in
this file. CLOB data larger than 64k cannot be edited in the Clob Editor.
Option Description
File If data is imported, shows the name of the import source file.
Editor Workarea Displays the character data in the selected object.
Actions
Use the action buttons to the right of the editor to import, export, or clear character data.
Option Description
Import Click to import character data from a file.
Export Click to export the character data displayed in the editor to a file, such
as a Microsoft Word or text file.
Clear Click to remove all data displayed in the editor workarea.
OK Click to save the data to the object.
Actions on Object
You can import, export, or clear the binary data in the editor. These functions are selected by clicking
the action buttons to the left of the editor workarea.
Editor Workarea
The editor workarea displays the data you selected for edit. You can insert, delete, and modify data
displayed in this area. You can import from or export to files, such as a Microsoft Excel file. You can also
remove all data by clicking Clear.
Slidebars
Large binary data is frequently too large to display without scrolling the editing area. Use the slidebars
on each side of the editor workarea to scroll right-left or up-down through data.
Actions
Use the action buttons to the right of the editor to import, export, or clear binary data.
Option Description
Import Click to import binary data from a file.
Export Click to export the binary data displayed in the editor to a file, such as
a text file.
Clear Click to remove all data displayed in the editor workarea.
OK Click to save the data.
Actions
Use the action buttons to the right of the editor to import, export, or clear character data.
Option Description
Import Click to import character data from a file.
Export Click to export the character data displayed in the editor to a file, such
as a Microsoft Word or text file.
Clear Click to remove all data displayed in the editor workarea.
OK Click to save the data to the object.
Edit XML
Use the XML Editor to review and modify data in an XML data type object. that you selected using the
Table Data Editor.
Option Description
File If data is imported, shows the name of the import source file.
Editor Workarea Displays the data in the selected XML data type object.
Actions
Use the action buttons to the right of the editor to import, export, or clear XML data.
Option Description
Import Click to import XML data from a file.
Export Click to export the XML data displayed in the editor to a file, such as a
text file.
Clear Click to remove all data displayed in the editor workarea.
OK Click to save your data changes to the object.
Filter Tab
The Filter tab lists all columns in the table and enables you to set filter rules for each column. It is comprised
of the following elements:
Sort Tab
Use the Sort tab to specify column row order for the Sort operation. For example, if you move Column3 to
the Sort Columns list and position it as the first column in the list, the Sort operation sorts all column rows
based on the row order in Column3. The tab consists of the following elements:
1. The Export Data dialog opens. Follow these steps for both Export All and Export tasks.
2. In Output File, type the path name of the file to which you want the data exported. You can also click
Browse to locate and save the file.
3. In File Type, select from the list the type of the output file in the previous step. For example, you can
select a delimited text file, Excel, or Excel (97-2003) file.
4. Select Column Labels in First Row to specify that you want column labels to be output in the first row
of the file.
Transfer View
The Transfer View enables you to select a profile for a Teradata Database or Hadoop system, connect to the
system, and view a list of databases and tables in that system. The view displays the database objects in a tree
hierarchy that allows you to explore the structure of the data. For example, you can view a list of tables in the
selected database as well as stored procedures and macros.
Select Profile
Select a Connection profile from the list. The list displays the connection profiles to which you are already
connected. If you do not see the profile you want, it is probably not connected. To connect to a connection
profile, right-click Database Connections and select New. In the Connection Profile dialog select the type of
database to which you want to connect and complete the dialog information. See About Connection Profiles
for information about connecting.
Option Description
Teradata Opens the Copy Teradata Table wizard for specifying the Teradata
table that receives data.
External File (FastExport) Opens the Export Data Wizard which enables you to specify the
external file for the data transfer. The Teradata FastExport utility
performs the data transfer operation.
Hadoop Opens the Export Table to Hadoop wizard which enables you to
specify the Hadoop table object for the data transfer.
Option Description
Teradata Opens the Hadoop Table Load to Teradata wizard for specifying the
Teradata table object that receives data.
Aster Opens the Transfer Hadoop table to Aster wizard for specifying the
Aster table object that receives the data.
External File Export data from Hadoop to an external file in your system.
Option Description
Hadoop Opens the Hadoop Table Load to Teradata wizard which enables you
to specify the Teradata table object for the data transfer from Hadoop.
External File (FastLoad) Opens the Load Data Wizard which enables you to specify the
external file in your file system to which the data is loaded using the
Teradata FastLoad utility.
Option Description
Teradata Loads the data from a specified Teradata table.
External File (FastLoad) If Smart Loader is enabled for this connection, this option opens the
Load Data Wizard which enables you to specify the external file in
your file system to which the data is loaded.
Option Description
Hadoop Loads data from the selected Hadoop table to an Aster table.
External File Loads data from an external file in your system.
Option Description
External File Exports data from Aster to an external file in your system.
Teradata Destination
Note:
When you transfer all table data in a database by right-clicking the database's Tables node in the Data
Source Explorer and selecting Teradata > Data Transfer > External file, the data transfer is performed
using the Teradata SmartLoad utility.
Source
Displays the name of the Teradata Database and table database.table that are the source for the data
transfer. This information cannot be edited.
Destination
Displays the name of the Hadoop table to which the data is to be transferred. Enter the Delimiter to use
for the transfer.
Column Specification
Select the columns in the Teradata table to transfer to Hadoop. You must specify each column
individually.
Existing Destination Table Data
Specify whether to replace the data in the destination table or append it.
Job Name
Names the transfer job. You can change the job name, if necessary. The job name can be useful if the
export is an operation that you might re-execute in the future.
Reset
Sets all the fields back to their default values.
When you click Finish, the settings are passed to the Transfer Progress View where you can monitor the
status of the transfer job.
Note:
When you transfer all table data in a database by right-clicking the database's Tables node in the Data
Source Explorer and selecting Aster > Data Transfer > External file, the data transfer is performed
using the SmartLoad utility.
Option Description
Delimited Text Text file that uses delimiters to separate data; such as, commas or semicolons in
a TXT or CSV file.
Excel (.xlsx) Microsoft Excel file with.xlsx file extension.
Excel 87-2003 (.xls) Microsoft Excel file with.xls file extension.
8. [Optional] Select the Column Labels in First Row check box to specify to use the first row of data as
the column labels for the new table.
9. If you selected Delimited Text as the file type, complete these fields:
Field Description/Action
Column Delimiter Type of delimiter to use in the output file using the list. The options
are:
Comma
Semicolon
Space
Tab
| (vertical bar)
Character String Delimiter Distinguishes a string text. The options are:
" (double-quotes)
' (single quote)
None
File Encoding Character set used to encode the data. The options are:
UTF-8
utf-16
ISO-8859-1
UTF-16BE
UTF-16LE
US-ASCB
Cp1252
If you selected Excel (.xlsx) or Excel 97-2003 (.xls), there are no additional options to complete.
10. Click Next to filter the Aster table data when it is exported and preview the generated SQL.
You can click Finish at any time to export data.
11. In Filter Selected Table indicate whether to filter by columns or by data for each column to be
exported using one of these methods:
Filter Option Action
Filter by a column Check the box beside the column name
You can also transfer Hadoop table data to an Aster table by right-clicking an Aster schema Tables node in
the Data Source Explorer and selecting Aster > Data Transfer. The Data Transfer opens with Hadoop
shown as the source and Aster as the destination.
Option Description
Delimited Text Text file that uses delimiters to separate data; such as, commas or semicolons in
a TXT or CSV file.
Excel (.xlsx) Microsoft Excel file with.xlsx file extension.
Excel 87-2003 (.xls) Microsoft Excel file with.xls file extension.
7. [Optional] Select the Column Labels in First Row check box to specify to use the first row of data as
the column labels for the new table.
8. [Optional] Select the Lock Table check box to lock the table during the load operation.
9. [Optional] Select the Replace Existing Data check box if you want the existing data in the Aster table
to be replaced by the loaded data.
10. If you selected Delimited Text as the file type, complete these fields:
Field Description/Action
Column Delimiter Type of delimiter to be used. The options are:
Comma
Semicolon
Space
Tab
| (vertical bar)
Character String Delimiter Distinguishes a string text. The options are:
" (double-quotes)
' (single quote)
None.
File Encoding Character set to use to encode the data. The options are:
UTF-8
utf-16
ISO-8859-1
UTF-16BE
UTF-16LE
US-ASCB
Cp1252.
11. If you selected Excel (.xlsx) or Excel 97-2003 (.xls), select the Excel worksheet from which to load the
data.
12. Click Finish.
Aster Destination
Displays the Connection Profile that is connected to the Aster Database system. Aster Database shows
the name of the database selected to receive data. You cannot edit Destination information.
Transfer From
Specifies the Hadoop data source for the transfer. Begin by selecting the Connection Profile which
displays a list of databases in the profile. After you select a database, a list of tables in the selected
database displays. Select the table that contains data you want transferred to the selected Aster table.
Hadoop System
Selects the profile for the Hadoop system that contains the data to be transferred. Use the list in Hadoop
Connection Profile to make your selection.
Hadoop Database
Selects the database that contains the source table from the list.
Hadoop Table
Selects the source table that contains the data to transfer.
Data Source
The name of the Hadoop table that is the source for the transfer. You cannot edit this information.
Destination for Data Transfer
The name of the Aster database to which the data is to be transferred. The table you selected in the
previous wizard screen displays in the Aster Table field. You can select a different table.
Columns to Transfer
Select check boxes to indicate which columns in the Hadoop table to transfer to the Aster table. By
default the column data type of the Aster table is based on the column data type of the source Hadoop
table. Verify the column data type and use the list to select a different data type if needed. You are able to
set the data type for each column in the table.
Select Column Buttons
You can select to transfer all columns by clicking Select All or no columns to be transferred by clicking
Select None at the bottom of the column list.
Naming of Job
The name for the transfer job displays at the bottom of the screen. You can change the job name.
Reset All Values
Sets all the fields back to their default values.
Note:
When you transfer all table data in a database by right-clicking the database's Tables node in the Data
Source Explorer and selecting Hadoop > Data Transfer > External file, the data transfer is performed
using the Teradata FastExport utility.
Destination
Verify the destination information is correct. Hadoop Connection Profile shows the Connection
Profile connected to the target Hadoop system. Hadoop Table shows the database.table name of
the table selected to receive data.
Source
Source
Displays the name of the Teradata Database and table database.table that are the source for the data
transfer. This information cannot be edited.
Destination
Displays the name of the Hadoop table to which the data is to be transferred. Enter the Delimiter to use
for the transfer.
Column Specification
Select the columns in the Teradata table to transfer to Hadoop. You must specify each column
individually.
Existing Destination Table Data
Specify whether to replace the data in the destination table or append it.
Job Name
Names the transfer job. You can change the job name, if necessary. The job name can be useful if the
export is an operation that you might re-execute in the future.
Reset
Sets all the fields back to their default values.
When you click Finish, the settings are passed to the Transfer Progress View where you can monitor the
status of the transfer job.
Option Description
Copy Data Copies the data with the table.
Lock Table Locks the table during the Copy Object operation.
15. Click Next.
16. Identify the specific data you want to include in the data transfer operation using one of the following:
Option Description
De-select columns Un-check the box beside the table column you do want transferred.
you do not want to
include
Filter data Use the filter list to select the filter type and type a value on which to filter the
data. For example, for PhoneNo if you select the filter "equal to" (=) and enter
the value 315*, only phone numbers that begin with area code 315 are
transferred. The default is None.
17. Review the Job Name information and if needed, edit the name.
18. Click Next.
19. In SQL Summary, review the generated Data Definition Language (DDL) script for the transfer.
Some objects, such as macros, display blank.
20. [Optional] If you want to save the DDL script, click Save DDL to open the SQL Save dialog and specify
a file location and name.
21. Click Finish to run the transfer job.
The Copy Object Wizard prompts you that the object created successfully or failed.
Option Description
Copy Data Copies the data with the table.
Lock Table Locks the table during the Copy Object operation.
8. Click Next.
9. [Optional] If you are copying a table, select one of these methods to transfer the data:
Option Description
Transferring data to a new Select each column you want transferred. You can filter data by
table specifying filter values for individual columns. The default is None.
Transferring data to an Specify which columns are to receive data from the source table, and
existing table select whether to append the data or replace existing data in the
destination table.
10. In Job Name, accept the default name or rename the Copy Object job.
11. Click Next.
12. In SQL Summary, review the generated Data Definition Language (DDL) script for the transfer.
Some objects, such as macros, display blank.
13. [Optional] If you want to save the DDL script, click Save DDL to open the SQL Save dialog and specify
a file location and name.
14. Click Finish to run the transfer job.
The Copy Object Wizard prompts you that the object created successfully or failed.
15. If the transfer operation is successful you can monitor the data transfer job in the Transfer Progress
View or review details about the data transfer job in the Transfer History View.
Source Database
The source information includes the names of the Connection Profile, Database, and Table from which
the data is copied.
Destination Database
The destination information includes the names of the Connection Profile, Database, and Table to which
the Copy Object Wizard copies the data.
Instructions for Copy Job
You can specify these options for the Copy job:
Option Description
Copy Data Creates the destination table and copies the source data to the new
table.
Lock Table Locks source and destination tables during the data transfer.
Interface Description
Copy Table Shows the database and object name of the data source and
destination. Use this screen to verify that the transfer information is
correct. You can select Copy Data to copy the data in the source table
to the destination table. A Lock Table option allows you to lock the
tables during the transfer.
Filter Copy Columns Enables you to select which columns in the table to transfer. The Filter
Copy Columns screen is specific to table objects. After you select a
column, you can filter for the data in that column to transfer. The
default is to transfer all data.
Column Specification Enables you to select which columns to transfer and which data type to
assign when copying table data to an existing table.
SQL Summary Displays the generated Data Definition Language (DDL) script that
copies the source object to its destination. You can save the DDL and
run it later or create the transfer job to run it immediately by clicking
Finish.
Column Filter
Allows you to select a filter type from the list, and if appropriate, enter a filter value in the text box. You
must enter a value that is valid for the column data type. The data type displays beside the column name.
Column Select for Copy
You can select the check box beside a column name to copy the column to the destination table. All
columns are selected by default.
Actions on All Columns
All columns are selected by default. Use the Clear All and Select All buttons to act on all columns in the
table.
Copy Data Job Name
Copy Object Wizard generates a default job name based on the source table name. You can edit the
default job name.
Source Columns
The Source Column Name/Type lists the table columns stored in the source database you selected. You
select which of the columns you want copied to the destination table by specifying a name for the an
existing column in the destination table.
Destination Columns
The Destination Column Name/Type displays one option list for each source column. Use the option
list to map the source column name and data type to an existing destination column.
Column Filter
Select a filter type from the list, and if appropriate, enter a filter value in the text box. You must enter a
value that is valid for the column data type. The data type displays beside the column name.
Instructions for Copy Job
Provides the following options to specify how you want data copied to the destination table:
Option Description
Append data to destination Appends the copied data to the end of existing data in the table.
table
Replace existing data in Replaces any existing data in the destination table with the copied
destination table data.
Volatile tables exist only during the session in which they are created. When a database session ends,
Teradata Database automatically drops all volatile tables that were created during the session. After you have
created a volatile table, use the Load Data wizard to import external data into the table.
After the Load Data Wizard opens, specify the name, path, and external file type of the source file. Be sure
to specify data delimiters and encoding used in the source file. Use the drop-down lists to select the correct
information.
Note:
JDBC FastLoad operations are not applicable to Aster data transfers.
Option Description
Input File Specify the path and name of the file from which to import data and to
specify the server path to its location in the file system. To locate an
existing file, click Browse and navigate the file system to select a file.
File Type Select the type of file to be imported. You can choose to load data from
a text file, such as a.txt or.cvs file, or from a Microsoft Excel file.
Choose between a.xslx file, or.xls (Microsoft Excel 97-2003) file. The
file data options change depending on which type of source file you
selected.
Column Labels in First Row Select to specify that the first row in the file contains the column labels
so that the first row in the file is ignored.
Stop Loading If Max Error(s) Specify the maximum number of errors allowed before the wizard
Occur stops the Load operation.
Lock Table Select to prevent row lock errors.
Note:
Selecting this option may cause the import operation to be slow.
Replace Existing Data If the table is not empty, check this option to replace the existing data.
Leaving it cleared appends the loaded data to the existing data. If the
table is empty, this option is grayed out.
The File Options change depending on the file type you select, and the destination. For example, the
Delimited Text options are:
Option Description
Column Delimiter Specify the column delimiter used in the input file.
This does not apply to Hadoop.
Character String Delimiter Specify the character string delimiter used in the input file.
This does not apply to Hadoop.
Line Separator Specify the type of column delimiters, character string delimiters, and
character encoding the data in the imported file uses. If you specified
an EXCEL spreadsheet as the input file and selected either EXCEL
(.xlsx) or EXCEL 97-2003 (.xls) as the file type, you can import data
from a single worksheet in the file by selecting a worksheet name in
Import Worksheet. The Line Separator options enable you to import
files that have only LineFeed (LF), as in Unix and Linux, or only
Option Description
Carriage Return (CR) as in Mac OS/X prior to v10.0, or both, as for
Windows. The options are:
• Windows OS (CR and LF)
• Prior to Mac OS X v10.0 (CR)
• Unix, Linux, Mac OS X v10.0 and above (LF)
File Encoding Specify the type of encoding to used for the file.
Start Loading at Row Number Specify the table row number where the Load operation begins.
Option Description
Import Worksheet Import Worksheet - View a list of worksheets found in the specified
Excel file. Specify which worksheet you want to import.
Start Loading at Row Number Specify the table row number where the Load operation begins.
Data contained in the external file displays at the bottom of the wizard screen. Table data includes column
name, column data type, and values in table rows.
When you click Finish, the results display in the Teradata SQL History view. Click the Message tab to view
detailed messages.
Option Description
Delimited Text Text file that uses delimiters to separate data; such as, commas or semicolons in
a TXT or CSV file.
Excel (.xlsx) Microsoft Excel file with.xlsx file extension. This is not available for Hadoop.
Excel 87-2003 (.xls) Microsoft Excel file with.xls file extension. This is not available for Hadoop.
8. [Optional] Select Column Labels in First Row to use the first row of data as the column labels for the
new table.
9. Select Stop Loading If Max Error(s) Occur and specify the maximum number of errors allowed
before the Load operation stops.
Note:
The JDBC Driver feature is not applicable for Aster data transfers.
When loading data, not all data type conversions supported by the Teradata JDBC Driver are supported by
JDBC FastLoad or JDBC addBatch. This is an issue related to Date, Time, and Timestamp data types.
Teradata recommends that when you load data for these data types, use the following JDBC escape formats:
• JDBC Date escape format is: yyyy-mm-dd.
Note:
You must select External File as the Source Type to launch the Load Data Wizard.
After the Load Data Wizard opens, specify the name, path, and external file type of the source file. Use the
drop-down lists to select the correct information.
Option Description
Input File Specify the path and name of the file from which to import data and to
specify the server path to its location in the file system. To locate an
existing file, click Browse and navigate the file system to select a file.
File Type File type is Delimited Text. This cannot be changed.
Delimiter The delimiter corresponds to the delimiter of the Hadoop table you are
importing.
Option Description
Table File Format The table file format corresponds to the table file format of the Hadoop
table you are importing.
Replace Existing Data If the table is not empty, check this option to replace the existing data.
Leaving it cleared appends the loaded data to the existing data. If the
table is empty, this option is grayed out.
Line Separator Specify the line separator used in the file you are importing. .
File Encoding Specify the type of encoding to used for the file.
Data contained in the external file displays at the bottom of the wizard screen. Table data includes column
name, column data type, and values in table rows.
When you click Finish, a file transfer job is launched in the Transfer Progress View view. When the
transfer is complete, it is displayed in the Transfer History View.
Import File
Enter the path and name for the file to import or click Browse to find a file on your file system.
File Type
Select the type of file to import. The default file type is delimited text. The Microsoft Excel file type has
options for files with .xlsx and .xls extensions.
Column Labels in First Row
Select to specify that the first row in the file contains the column labels so that the first row in the file is
ignored.
File Encoding
Specify the type of encoding to used for the file.
Option Action
Teradata Teradata > Data Transfer
Aster Aster > Data Transfer
Option Description
Delimited Text Text file that uses delimiters to separate data; such as, commas or semicolons in
a TXT or CSV file.
Excel (.xlsx) Microsoft Excel file with .xlsx file extension.
Option Description
Comma Input file data is separated by commas (,)
Semicolon Input file data is separated by semicolons (;)
Space Input file data is separated by blank spaces
Tab Input file data is separated by Tabs
Fixed Width Input file data has fixed width columns. Specify in the Fixed Width Columns field a
numeric value for the fixed column width.
I Vertical bar (I) is used to separate data
11. If you selected Delimited Text, select the Character String Delimiter to use to distinguish string text.
The options are " (double-quotes), ' (single quote), or None. This option does not apply to Hadoop.
12. If you selected Delimited Text, in Line Separator select one of the following options based on the
operating system from which the data is imported. This option enables you to import files with only
Carriage Returns (CR), only LineFeeds (LF), or both Carriage Returns and LineFeeds (CR and LF).
• Windows OS (CR and LF)
• Prior to Mac OS X v10.0 (CR)
• Unix, Linux, Mac OS X v10.0 and above (LF)
13. If you selected Delimited Text, in File Encoding select the character set to use to encode the data.
The options are: UTF-8, utf-16, ISO-8859-1, UTF-16BE, UTF-16LE, US-ASCB, Cp1252.
14. Click Next.
The Table Column Data Types screen displays.
15. In Table Name, type the name of the table to be derived from the loaded data.
16. [Teradata Only] In Primary Index, select whether this table will have a primary index, and whether it
is unique.
The Teradata primary index is used to evenly distribute data among AMPs.A non-unique primary
index permits the insertion of duplicate field values.
17. Select the Table Type.
18. To edit the data types of a specific column, click (ellipses) in the column header.
19. Select one of the following:
1. On the Data Types page, click the ellipsis next to the data type to change.
2. In Type select the data type for the column you are editing.
The remaining options vary depending on the data type.
3. Select Can contain nulls if the data in the column can include null values.
This action de-selects Values must be unique if it is selected.
4. Select Values must be unique if the data in the column must be unique values.
This action deselects Can contain nulls.
5. If you selected SMALLINT as the data type, you can select Distribute by Hash if you want specify a
distribution key column.
Using Distribute by Hash with a distribution key is mandatory for fact tables and optional for
dimension tables. Joins involving columns that are part of a distribution key constraint will be optimized.
6. Click OK.
Input File
Enter the path and name for the file to import or click Browse to find a file on your file system.
File Type
This is Delimited Text for Hadoop destinations.
Column Labels in First Row
Select to specify that the first row in the file contains the column labels so that the first row in the file is
ignored. This option is not available for Cloudera systems.
Column Delimiter
Specify the column delimiter used in the input file.
Line Separator
The Line Separator options enable you to import files that have only LineFeed (LF), as in Unix and
Linux, or only Carriage Return (CR) as in Mac OS/X prior to v10.0, or both, as for Windows. The
options are:
• Windows OS (CR and LF)
• Prior to Mac OS X v10.0 (CR)
• Unix, Linux, Mac OS X v10.0 and above (LF)
Option Description
Comma Input file data is separated by commas (,)
Semicolon Input file data is separated by semicolons (;)
Space Input file data is separated by blank spaces
Tab Input file data is separated by Tabs
8. In Line Separator, select one of the following options based on the operating system from which the
data is imported. This option enables you to import files with only Carriage Returns (CR), only
LineFeeds (LF), or both Carriage Returns and LineFeeds (CR and LF).
• Windows OS (CR and LF)
• Prior to Mac OS X v10.0 (CR)
• Unix, Linux, Mac OS X v10.0 and above (LF)
9. In File Encoding select the character set to use to encode the data.
The options are: UTF-8, UTF-16, ISO-8859-1, UTF-16BE, UTF-16LE, US-ASCB, Cp1252.
10. Click Next.
The Hadoop Table Properties screen displays.
11. In Table Name, type the name of the table to be derived from the loaded data.
12. In Table File Format, select the format of the data in the table.
Supported table file format types are TEXT (default), SEQUENCE, RC, and ORC. ORC is only
available for Hortonworks.
For Cloudera Systems, if RC or SEQUENCE is selected for Table File Format, the wizard requires
Hive JDBC Properties.
Option Description
Click Next Previews the SQL/DDL code that creates the new table. You can edit the SQL
statements in the Generated SQL text area by clicking Show in Editor. If you choose
to open the SQL Editor, the Smart Load Wizard closes. You can run the SQL query
statements from the SQL Editor to create the table.
Click Finish Creates the table and imports the data from the file.
1. On the Data Types page, click the ellipsis next to the data type to change.
2. In Type select the data type for the column you are editing.
3. Click OK.
Progress Bar
The view displays a list of the data transfer jobs that are currently executing. After a job completes, it
becomes an entry in the Transfer History View .
Queue List
Transfer jobs run one at a time. If a job is already running, the next job request is placed in the queue
and designated as "queued" in the Progress column.
Toolbar
The Transfer Progress View toolbar allows you to cancel any jobs that are running and to view
additional details about a job in the view list.
Transfer Details
The Transfer Details dialog displays the output of the transfer operation while the job is running.
After the job completes, you can view the output in the Transfer History View.
Job Details
The Job Details dialog displays the output of the transfer operation while the job is running. After the job
completes, you can view the output in the Transfer History View.
If you close the view, select Window > Show View > Transfer History View to reopen the view.
You can add notes manually by selecting the Transfer History View Note entry and in the toolbar clicking
Edit Note. In the Transfer History Note dialog, type the note you want added to the Transfer History
View entry.
All columns are sortable in ASC/DSC order with the exception of the parameters column. The columns are
sorted by left clicking the mouse button. This is for single column sorting only.
Columns are movable by selecting the column and dragging it to the new location. Columns are also re-
sizable. Rows can be selected by clicking in the numbered row header.
If a filter is in effect, the result of a newly executed data transfer is inserted at the top row, regardless of
whether it meets the filter criterion. If a sort is in effect the new entry is inserted in the sorted order.
The Summary column contains a brief summary of the data transfer, such as the source database and table
names. The Job Output can be displayed by selecting the history entry and clicking Show Job Output in the
toolbar. Failed data transfers display as red text in the Status column.
Toolbar Actions
Edit note Click to edit the note field of the transfer history entry.
Delete selected Click to delete selected row(s) from the view and transfer history
row(s) database.
Clear filter Click to clears the filter and refresh the transfer history display.
Toolbar Menu
Edit Note Click to edit the note of the transfer history entry.
Delete Selected Click to delete selected row(s) from the view and transfer history
Row(s) database.
Delete All Transfer Click to delete all entries in the transfer history database.
History
Filter Click to open a dialog to Filter display.
Clear Filter Click to remove the current filter from the display.
Reexecute Click to execute the selected data transfer job in the Transfer History
list.
Show Transfer Job Click to display the job output for the selected data transfer job.
Output
Column Headers
Find Displays the Find dialog to search rows in the column for a value. -
Searches the Transfer History View for a value.
Note:
New data transfers appear regardless of whether or not they meet the filter criterion.
Element Description
Summary Filters on the Summary column. This is a "LIKE" filter.
Sort
The Sort dialog enables you to perform multi-column sorting. Select columns from the Columns list and
move them to the list of columns to be sorted. Use the sort direction to move columns from and to lists. If a
subsequent single column sort is made by clicking a column header, the multi-column sort is removed.
Troubleshooting
Teradata Error Log
The Teradata error log, teradata.log, is located in the user workspace .metadata/Teradata directory.
Log messages are sent to the teradata.log file as well as to the Teradata Log console. To display the
Teradata Log console, first you need to open the Console View. From the main menu, select Window >
Show Views > Other. Then select General > Console and click OK. The Console View opens at the bottom
of the screen. From the Console View toolbar you can open the Teradata Log console by clicking the down
arrow icon and selecting TeradataLog.
Turning on Debug
You can configure the level of logging desired via the Teradata Logging Preferences page. Logging levels
for the Teradata Log console and the Teradata log file are controlled separately. For example, you can change
the logging level for the Teradata log file by clicking the DEBUG button under the Datatools Logging
Level, then clicking Apply. This action enables debug logging for all of Teradata Studio plug-ins, with log
messages going to the teradata.log file.
You can also add a Logger for more localized logging. For example, you can log debug messages for only the
com.teradata.datatools.dtp.catalog plug-in. Here are the steps for turning on the debug logging
level:
1. Click the Loggers New button.
2. Enter the name of the plug-in, such as com.teradata.datatools.dtp.catalog.
3. Select com.teradata.datatools.dtp.catalog in the Loggers list and choose the logging level,
such as DEBUG.
4. Click Apply.
This enables debug message logging for the com.teradata.datatools.dtp.catalog plug-in, with
log messages going to the teradata.log file. You can add additional plug-ins to the list and configure
each with its own logging level.