TeradataStudioUserGuide 2041
TeradataStudioUserGuide 2041
TeradataStudioUserGuide 2041
Teradata Studio
User Guide
Release 15.10
B035-2041-045K
April 2015
The product or products described in this book are licensed products of Teradata Corporation or its affiliates.
Teradata, Active Data Warehousing, Active Enterprise Intelligence, Applications-Within, Aprimo Marketing Studio, 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.
AMD Opteron and Opteron are trademarks of Advanced Micro Devices, Inc.
Apache, Apache Hadoop, 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.
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.
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 2015 by Teradata. All Rights Reserved.
Table of Contents
Preface...........................................................................................................................................................19
Purpose................................................................................................................................................................ 19
Audience.............................................................................................................................................................. 19
Revision History................................................................................................................................................. 19
Additional Information..................................................................................................................................... 19
Related Documents..................................................................................................................................... 19
Product Safety Information...............................................................................................................................19
Chapter 1:
Overview..................................................................................................................................................... 21
Chapter 2:
Teradata Studio Basics................................................................................................................. 25
Getting Started.................................................................................................................................................... 25
Launching Studio Workbench................................................................................................................... 25
Setting Up Your Workspace....................................................................................................................... 25
Changing Workspace Locations on Linux........................................................................................26
Changing Workspace Locations on MacIntosh............................................................................... 26
Changing Workspace Locations on Windows..................................................................................26
Getting Started With Teradata Studio.......................................................................................................26
Exiting Studio Workbench......................................................................................................................... 26
Teradata Studio Interface...................................................................................................................................27
Studio Workbench.......................................................................................................................................27
Customizing the Display..................................................................................................................... 28
Studio Views................................................................................................................................................. 28
Teradata Studio Views..........................................................................................................................28
Opening Views......................................................................................................................................29
Moving View Panels............................................................................................................................. 30
Studio Toolbars............................................................................................................................................. 30
Studio Preferences........................................................................................................................................ 31
Teradata Studio Preferences.................................................................................................................31
Data Management Preferences.....................................................................................................31
General Preferences....................................................................................................................... 32
Help Preferences.............................................................................................................................32
Teradata Datatools Preferences.................................................................................................... 32
Setting Preferences................................................................................................................................ 33
Teradata Studio Perspectives..............................................................................................................................33
Teradata Administrator Perspective...........................................................................................................34
Opening the Teradata Administrator Perspective............................................................................ 34
Query Development Perspective................................................................................................................ 35
Toolbar for Query Development......................................................................................................... 36
Actions.............................................................................................................................................36
Opening the Query Development Perspective..................................................................................36
Data Transfer Perspective............................................................................................................................37
Opening the Data Transfer Perspective..............................................................................................37
Database Development Perspective........................................................................................................... 38
Opening the Database Development Perspective............................................................................. 38
Chapter 3:
Database Connectivity....................................................................................................................39
Chapter 4:
Teradata Studio Workbench.................................................................................................... 69
Project Explorer................................................................................................................................................... 69
Data Source Explorer.......................................................................................................................................... 69
Data Source Explorer Load Preferences.................................................................................................... 69
What to Load......................................................................................................................................... 70
What to Display..................................................................................................................................... 70
Load Object Details...............................................................................................................................70
Actions.................................................................................................................................................... 71
Setting Data Source Explorer Load Preferences.......................................................................................71
Loading Teradata Databases to Data Source Explorer............................................................................ 72
Removing Teradata Databases in Data Source Explorer.........................................................................73
Setting Root of Data Source Explorer Display..........................................................................................73
Object Viewer....................................................................................................................................................... 73
About the Object Viewer..............................................................................................................................73
Opening the Object Viewer..................................................................................................................75
Sorting in Object Viewer...................................................................................................................... 75
Filtering Object Views...........................................................................................................................75
Toolbar for Object Viewer.................................................................................................................... 76
Actions.............................................................................................................................................76
Setting Object Viewer Preferences...................................................................................................... 78
About Viewing Objects................................................................................................................................ 78
Viewing Objects in a Database............................................................................................................ 79
Databases View........................................................................................................................79
Toolbar.............................................................................................................................. 80
Indexes View............................................................................................................................ 80
Toolbar.............................................................................................................................. 80
Macros Tab...............................................................................................................................81
Toolbar.............................................................................................................................. 81
Stored Procedures View..........................................................................................................82
Toolbar.............................................................................................................................. 82
Tables View...............................................................................................................................83
Toolbar.............................................................................................................................. 83
User-Defined Functions View............................................................................................... 84
User-Defined Function Types Actions..........................................................................84
Views View............................................................................................................................... 85
Toolbar.............................................................................................................................. 85
Viewing Object Details......................................................................................................................... 86
Database Object Tab...............................................................................................................86
User Information Tab...................................................................................................... 86
Tables Tab..........................................................................................................................86
Macros Tab........................................................................................................................87
Procedures Tab................................................................................................................. 87
Indexes Tab....................................................................................................................... 88
Jars Tab.............................................................................................................................. 88
UDFs Tab......................................................................................................................... 88
Privileges Tab...................................................................................................................89
Systems Rights Tab......................................................................................................... 89
Query Logging Tab.........................................................................................................89
Access Logging Tab........................................................................................................ 90
Rights Held By Tab......................................................................................................... 90
Column Rights Tab.........................................................................................................90
Stored Procedure Object Tab................................................................................................91
Parameters....................................................................................................................... 91
Details...............................................................................................................................91
SQL................................................................................................................................... 92
Privileges.......................................................................................................................... 92
Users................................................................................................................................. 92
Macro Object Tab...................................................................................................................92
Parameters Tab................................................................................................................92
Details Tab....................................................................................................................... 93
SQL Tab............................................................................................................................93
Privileges Tab...................................................................................................................93
Users Tab..........................................................................................................................93
Table Object Tab.....................................................................................................................93
Columns Tab...........................................................................................................................94
Details Tab.............................................................................................................................. 95
Indexes Tab............................................................................................................................. 96
Constraints Tab...................................................................................................................... 96
Triggers Tab............................................................................................................................ 98
Space Use Tab......................................................................................................................... 98
SQL Tab................................................................................................................................... 99
Privileges Tab..........................................................................................................................99
References Tab........................................................................................................................99
Statistics Tab........................................................................................................................... 99
Users Tab...............................................................................................................................100
Column Rights Tab..............................................................................................................100
UDF Object Tab................................................................................................................... 100
Parameters Tab..............................................................................................................100
Details Tab..................................................................................................................... 101
SQL................................................................................................................................. 101
Source.............................................................................................................................101
Privileges Tab................................................................................................................ 101
User.................................................................................................................................101
View Object Tab................................................................................................................... 101
Columns Tab................................................................................................................. 101
Details Tab..................................................................................................................... 102
SQL Tab..........................................................................................................................102
Privileges Tab..................................................................................................................102
References Tab................................................................................................................102
Users Tab.........................................................................................................................103
Chapter 5:
Administration of Teradata Databases ...................................................................... 105
Data Utilities.......................................................................................................................................................105
Data Utilities Preferences.......................................................................................................................... 105
Disk Cache........................................................................................................................................... 105
Actions.................................................................................................................................................. 105
Administration Dialogs.................................................................................................................................... 106
Administer Profiles.................................................................................................................................... 106
Administer Profile Tabs......................................................................................................................106
About User Profiles............................................................................................................................. 106
Required Privileges............................................................................................................................. 106
About Dropping a User Profile..........................................................................................................106
General..................................................................................................................................................107
Users In Profile.................................................................................................................................... 107
Password............................................................................................................................................... 108
SQL Preview.........................................................................................................................................109
Create Authorization................................................................................................................................. 110
Display Authorization Tab................................................................................................................. 110
Set Authorization Tab......................................................................................................................... 110
Grant, Revoke, or Display System Rights................................................................................................111
Grant/Revoke Tab............................................................................................................................... 111
SQL Preview Tab................................................................................................................................. 112
Display Tab...........................................................................................................................................112
Grant Tab..............................................................................................................................................112
Revoke Tab........................................................................................................................................... 113
SQL Preview Tab................................................................................................................................. 113
Display, Grant, and Revoke Privileges..................................................................................................... 114
Grant/Revoke Tab............................................................................................................................... 114
SQL Review Tab...................................................................................................................................115
Display Tab ..........................................................................................................................................115
Grant Tab..............................................................................................................................................116
Revoke Tab........................................................................................................................................... 116
Grant, Revoke, or Display Column Rights..............................................................................................117
Grant/Revoke Tab............................................................................................................................... 117
SQL Preview.........................................................................................................................................118
Display Tab...........................................................................................................................................118
Grant Tab..............................................................................................................................................118
Chapter 6:
Development of Teradata Databases............................................................................ 149
Chapter 7:
Teradata Data Labs..........................................................................................................................189
Chapter 8:
Query Development.........................................................................................................................197
Actions.................................................................................................................................................. 234
Setting SQL Handling Preferences....................................................................................................234
SQL History View.............................................................................................................................................. 235
SQL History View....................................................................................................................................... 235
Toolbar Actions................................................................................................................................... 236
Toolbar Menu Options....................................................................................................................... 237
Context Menu Options:......................................................................................................................237
About SQL History View........................................................................................................................... 238
Toolbar for SQL History............................................................................................................................ 239
Actions.................................................................................................................................................. 239
Filtering with Data Filter........................................................................................................................... 240
History Preferences.................................................................................................................................... 240
Exclude Options for History Database.............................................................................................240
History Rows........................................................................................................................................241
History View Columns Settings.........................................................................................................241
Actions.................................................................................................................................................. 242
Execution Plans..................................................................................................................................................242
About Comparing Execution Plans......................................................................................................... 242
Compare Graphic Execution Plans..........................................................................................................242
Execution Plan List.....................................................................................................................................242
Compare Execution Plans Tab..................................................................................................................243
Compare Step Attributes Tab....................................................................................................................243
Display Statistics Tab..................................................................................................................................243
Execution Plan List Actions...................................................................................................................... 243
Execution Plan Options.............................................................................................................................244
Graphic Comparison Actions...................................................................................................................245
Teradata Query Capture Database...........................................................................................................245
Statistics Data Actions............................................................................................................................... 246
Step Attribute Comparison Actions.........................................................................................................246
Comparison Actions.................................................................................................................................. 247
Teradata Execution Plan Preferences.......................................................................................................247
Statistics.............................................................................................................................................................. 247
Statistics Collection View.......................................................................................................................... 247
Collect Statistics Wizard............................................................................................................................ 249
Drop Statistics............................................................................................................................................. 250
Filter Operations.........................................................................................................................................251
Collect Statistics SQL Preview.................................................................................................................. 252
About Teradata SQL Query Builder................................................................................................................252
Chapter 9:
Table Data Development............................................................................................................255
Actions...........................................................................................................................................273
Opening the Clob Editor....................................................................................................................273
Editing CLOB Data............................................................................................................................. 274
About the Large Binary Editor................................................................................................................. 274
Opening the Large Binary Editor......................................................................................................275
Large Binary Editor.............................................................................................................................276
Edit Binary Data...........................................................................................................................276
Actions...........................................................................................................................................276
Editing Large Binary Data..................................................................................................................276
About the Large Text Editor......................................................................................................................277
Opening the Large Text Editor.......................................................................................................... 278
Large Text Editor................................................................................................................................. 278
Edit Text Value..............................................................................................................................278
Actions...........................................................................................................................................279
Editing Large Text Data......................................................................................................................279
About the XML Data Type Editor............................................................................................................279
Opening the XML Editor................................................................................................................... 281
XML Editor.......................................................................................................................................... 281
Edit XML.......................................................................................................................................282
Actions...........................................................................................................................................282
Editing XML Data............................................................................................................................... 282
Table Data Filtering........................................................................................................................................... 283
About Filtering Table Data........................................................................................................................283
About the Data Filter................................................................................................................................. 283
Filter Tab...............................................................................................................................................283
Sort Tab.................................................................................................................................................285
Chapter 10:
Database and Table Data Transfer.................................................................................. 287
Chapter 11:
Troubleshooting.................................................................................................................................. 349
Troubleshooting Studio.....................................................................................................................................349
Teradata Error Log..................................................................................................................................... 349
Turning on Debug...................................................................................................................................... 349
Parameter Tuning....................................................................................................................................... 350
Increasing Memory settings (OutOfMemory Error).............................................................................350
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 Description
April 2015 Release 15.10
Additional Information
Additional information is available at Teradata Developer Exchange.
Related Documents
Title Publication ID
Teradata Studio, Studio Express, Plug-in for Eclipse Installation B035-2037
Guide
Teradata Studio, Studio Express, Plug-in for Eclipse Release B035-2040
Definition
not avoided, could result in damage to property, such as equipment or data, but not related to
personal injury.
Example
Notice: Improper use of the Reconfiguration utility can result in data loss.
Overview
Feature Description
Drop or rename Tables, Views, Stored Procedures, Macros, or
User Defined Functions
Display information about Database, Users, Tables, Views,
Macros, Stored Procedures, User-Defined Functions, User-
Defined Types
Manage privileges on database Administer roles and profiles
objects Grant or revoke access and system rights
Set up the rules for Query and Access Logging
Manage databases and Create connection profiles to Teradata Databases, Teradata
connections Aster Databases, and Hadoop systems.
Move space from one database to another
Customize display by moving view panels and setting
preferences.
Transfer data between Teradata Databases, Teradata Aster
Databases, and Hadoop systems.
Component Description
Display detailed information about database objects displayed
in Data Source Explorer.
Drill down to objects and attributes of objects to understand
structure of databases, tables, and other object types.
Filter object views and perform functions on objects, such as
create views, and modify privileges for the object.
Result Set Viewer Displays the result set data, allowing it to be saved, exported, and
printed.
SQL Editor Preview SQL query statements.
Define SQL statements for execution or saving to file or
project.
Parse SQL statements for syntax errors.
Format SQL according to selected formatting options.
Connect to databases and view connection status.
Create, modify, and execute individual or multiple SQL
statements.
SQL History Create a historical record of submitted SQL queries that
include details such as timestamps, results status, record
counts, and so forth.
Export history data and shared with other Teradata Studio
users.
SQL Query Builder Visually build and edit SQL queries.
Table Data Editor Insert, delete, and update data in a Teradata database table.
Filter to see only rows you edited.
Set filter rules on table columns to show only data of interest.
Export table data to a file.
Manage large tables that contain thousands of rows of data.
Access Blob, Clob, XML Data Type, Large Text Data, and Large
Binary Data editors to manage tables that contain large objects.
Transfer History View View list of completed data transfer jobs.
Display job details such as source and destination, duration,
and success or failure of job.
Reexecute past job based on the historical setup of the job.
Transfer Progress View Monitor data transfer jobs.
Shows list of transfer jobs and status of each job.
Includes progress bar to indicate percentage and rate of
completion.
Cancel jobs in queue.
Completed jobs display in Transfer History View.
Transfer View Connect to a Connection Profile to view the structure of the
database for that profile.
Component Description
Transfer objects and data between Teradata Databases and
Hadoop systems, or from one Teradata system to another, or
from one Hadoop system to another.
Locate database objects as the source or destination for
importing or exporting the object data.
Drag and drop database objects between the Data Source
Explorer and the Transfer View to transfer them from one
system to another.
Getting Started
If you want to change the location of your workspace directory, you must launch Teradata
Studio using the -data option.
For example: TeradataStudio.exe -data C:\TeradataStudioWorkspace
Within the workspace directory, files are stored in projects. An initial project was created for
your SQL files, called SQL. Click on the Project Explorer tab to view the SQL project. You
can create additional projects using the New Project dialog. New SQL files can be created by
right-clicking the SQL folder and selecting the New > SQL File option.
You must connect to the database in which you want to work. The first step is to create
connection profiles for each database that you manage and/or in which you develop data and
objects.
You can open the Connection Profile you create in Data Source Explorer and browse the
Databases, Indexes, Macros, Tables, Stored Procedures, User-defined Functions, User-
defined Types, and Views folders to discover database objects. Clicking on an object in the
Data Source Explorer displays the object in the Object Viewer.
Note: The highest level in the tree is the database server node, indicated by the database
name provided in the Connection Profile. If no database name was provided, the default
database name 'DBC' is used.
1 From the main Teradata Studio menu bar, select File > Exit.
Studio 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. The
following example shows the Query Development perspective and displays these navigation
elements and views:
Data Source Explorer
Project Explorer
SQL Editor
Teradata SQL History
Teradata Result Set Viewer
Object Viewer
Toolbar
The Studio toolbar is the main toolbar for the Studio workbench.
Perspective Tabs
You can select to display tabs for as many different perspectives as you choose. Select
a perspective tab to dynamically move from one workbench perspective to another.
SQL Editor
In this example, the SQL Editor is shown. You can display other editors, such as the
Table Data Editor. Editors display when you select a specific perspective, for example
Query Development, or edit a database object, as for example, a table in the Table
Data Editor.
View Panes
Studio provides multiple view panes for the different type of development work you
perform in the workbench. These views include the Object Viewer for discovery of
objects in your database, and the Transfer Progress View for investigating executing
data transfer jobs and their status.
View Toolbar
Each view includes a toolbar that contains a selection of user actions that are specific
to the view. For common workbench actions, go to the main Studio toolbar at the
top of the screen.
View Details
The detailed information that displays in a view is presented in several ways. In this
example, the view data is shown in table columns which you can often customize in
the view preferences. Some views display additional details in tabbed views.
Status Messages
A status message displays at the bottom of the workbench to show information
about a process or action that may be in progress.
Navigation Pane
The Data Source Explorer displays the databases available through connection
profiles. After you connect to a database, it shows a hierarchical display of the
objects in that database. The Project Explorer shows the lists of projects you create
to organize and contain files and other elements related to a specific development
project.
Studio Views
View Description
Data Source Explorer Contains the database object tree display. 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.
Object Viewer Displays detailed information about objects in a database. Select a
database object in Data Source Explorer to display detailed
information about the object in the Object Viewer.
Data Lab View 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. You must
provide a Connection Profiles in order to execute the SQL
statements. Double-clicking a file in the Project Explorer causes
the file to be opened in the SQL Editor view.
SQL History View Contains the results when executing SQL statements and running
database routines, user-defined functions, and triggers.
Result Set Viewer Displays the result set data. Individual Result Set tabs are created
for each result set. The Result Set Viewer also contains a toolbar
with actions that can occur on the result set data, such as saving,
exporting, or printing the result set data.
Transfer History View Provides an enhanced display of the Data Transfer History
information in the database. When a data transfer completes, an
entry is placed in the Transfer History View.
Transfer Progress View Displays a list of executing data transfer jobs and their status.
Opening Views
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.
3 In Show View dialog, select a view and click OK.
The view you select displays in the workbench.
You can also remove a view panel by clicking the X on the view tab. A view can be re-
displayed by selecting the view from the Windows > Show View option in the main menu.
Studio Toolbars
Each Teradata Studio view contains a toolbar that gives you quick access to functions and
dialogs for creating, modifying, and administering database objects. For example, included in
the View toolbar are buttons to minimize, maximize, and restore the view.
The Teradata Studio toolbar is divided into different sections:
SQL Toolbar
The SQL toolbar buttons are used to perform actions on the SQL statements within
the SQL Editor. They include Execute as Individual Statements, Execute as One
Statement, Explain, Format, Prompt for Notes, Code Assist Auto-activation. SELECT
Statement and SHOW DDL are activated when a table is selected in the DSE.
Tools Toolbar
The Tools toolbar button provides actions to create or modify database objects, such
as creating or modifying databases or users, creating tables, views, stored procedures,
macros, triggers, and user defined types.
Directional Toolbar
The Directional toolbar buttons are used to reference locations within the SQL file.
They include Next Annotation, Previous Annotation, and Last Edit Location.
Sections of the toolbar can be moved above or below the main toolbar by selecting the
section and dragging it to the new location.
Studio Preferences
Option Description
General Specifies whether to continue when errors occur
during SQL execution.
SQL Editor Sets preference options for the SQL Editor for code
assist, connection behavior for SQL files, syntax
colors, and SQL templates.
Preference Description
Option Description
SQL Query Enables you to omit the current database/schema
Builder from the generated SQL statements of the SQL
Query Builder.
General Preferences
General options are used to configure the open mode, background running jobs, and heap
status.
Preference Description
Appearance Customizes the display appearance by enabling you to select 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. This option 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
Export Sets the preference to launch a native editor and customizes export options
for the output Microsoft Excel file.
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 Sets your preferences for which types of connection profiles to show as
Connection Types options in the New Connection Profile dialog.
Object Viewer Specifies which tabs are visible for objects displayed
QueryBand Specifies the query band name value pairs to provide as options for sessions
per connection. You select which query bands to use when you create a
connection profile and the JDBC properties for the connection.
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 Open options for Studio perspectives.
Table Data Editor Sets preferences for selection color options, filter thresholds, and editor
display and copy/paste options.
Setting Preferences
You can modify preferences for Teradata Studio by selecting Window > Preferences from
the menu bar. You can type in a filter text to filter the information to a more specific
preference item or navigate to the preference from the left hand tree display. Changes to
preferences are stored within your workspace.
Perspective Description
Database Development Integrated development environment for developing and
managing databases such as Oracle, IBM DB2, and Microsoft SQl
Server.
You can create additional custom perspectives by selecting Window > Customize
Perspective from the top menu bar.
The Teradata Administrator Perspective launches a related set of menus, toolbars, and
views that focus on database administrative tasks. The views enable an administrator to
create, manage, or administer database objects, view objects in specific databases, and
develop and run SQL statements.
Another useful view is the Data Lab View. Select the Window > Show View menu option to
open additional views.
opens views that provide detailed information about selected database objects and their
elements.
To open the Teradata Administrator perspective, select Window > Teradata
Administrator.
You can also open the perspective by clicking in the left corner of the tab bar.
The Query Development Perspective opens views that assist with developing and running
SQL queries that manage data and objects in your databases.
The following views automatically open when you select the Query Development
Perspective option.
View Description
Data Source Explorer Using the Data Source Explorer you can connect to a specific
database system using a Connection Profile and then view and
manage the database objects in the connected system.
Project Explorer The Project Explorer view panel provides a hierarchical view of
the Projects and their resource files. Use Project Explorer to select
SQL files for editing or to create new SQL files.
SQL Editor The SQL Editor enables you to develop, edit, test, and run SQL
query statements. It provides a Connection Profiles option for
executing the SQL statements. Double-clicking a file in the Project
Explorer causes the file to be opened
View Description
Result Set Viewer The Result Set Viewer provides an enhanced view of the result set,
including options to hide columns, filter on column values, copy
data to clipboard, format cell data, and switch between view
modes. Separate tabbed views are created for each generated result
set.
SQL History The SQL History contains the results when executing SQL
statements and running database routines, user-defined functions,
or triggers.
Another useful view is Data Lab View. Select the Window > Window menu option to open
these views.
Actions
Option Icon Label Description
Save the File (Ctrl + S) Saves the file.
You can also open the perspective by clicking in the left corner of the tab bar.
The Data Transfer Perspective launches an initial set of views that focus on data transfers
between Teradata Databases, Aster, and Hadoop databases. The views enable a database
administrator to perform tasks such as loading data stored in Hadoop into a Teradata
database and if desired, exporting the data to an external file or back to Hadoop.
To open the Data Transfer perspective, select Window > Data Transfer.
You can also open the perspective by clicking in the left corner of the tab bar.
The Database Development perspective launches menus, toolbars, and views that focus on
developing databases such as Oracle, IBM DB2, and Microsoft SQL Server. The perspective
enables you to develop database objects, develop SQL queries, perform database tasks, and
view results.
The Database Development perspective opens the following views:
View Description
Data Source Explorer Using the Data Source Explorer you can connect to a specific
database system using a Connection Profile and then view and
manage the database objects in the connected system.
SQL Editor The SQL Editor enables you to develop SQL query statements to
manage objects and data in your databases.
SQL Results The SQL Results view is a feature of the Eclipse Data Tools
Platform (DTP) project and displays the results from executing
SQL statements, running procedural routine objects, and
creating database objects.
Bookmarks The Bookmarks view is an Eclipse feature that displays all
bookmarks in your workbench.
1 Right-click the Open Perspective ( ) button in the left corner of the tab bar.
Database Connectivity
Option Description
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 System Connects to open source Hadoop systems using the
WebHDFS service (default).
Hortonworks Connects to Hortonworks Hadoop systems using these
user-defined options: Knox Gateway, Teradata
Connection to Hadoop (TDCH), Hive JDBC Driver,
and SQL-H (default).
Oracle Connects to an Oracle database.
SQL Server Connects to a Microsoft SQL Server.
Teradata Database Connects to Teradata Databases using the Teradata
Embedded JDBC Driver (default).
10 Type the Teradata password for the connection in the Password field.
11 If you are using advanced authentication, such as LDAP or Kerberos, select the
authentication mechanism from the list.
If you did not choose LDAP or Kerberos, the default protected logon is used.
12 [Optional] Set the Database field if your connection requires that a default database be
set at logon.
13 Select Save Password to save the password.
The password is valid for the workbench session.
14 In JDBC Connection Properties, accept the default properties or add and remove JDBC
connection properties to specify the connection details for the profile.
Option Description
Add Opens the Add JDBC Property dialog and lets you create property value
pairs by selecting a JDBC property and the corresponding value. You can
also add query bands for the session in the Add JDBC Property dialog.
Remove Removes a selected JDBC property value pair from the list.
Clear All Removes all JDBC properties from the list.
Save Properties Saves the JDBC properties in the list.
Reset to Defaults Restores the default JDBC Connection Properties and displays them in the
list.
The default JDBC connection properties include a QueryBand string which contains
query band name value pairs (separated by semicolons) for a session.
15 [Optional] Click Cache Properites to open the Database Cache Properties dialog and
select the databases to cache.
16 [Optional] Click Delete Cache to delete cache files.
The Confirm Delete Cache dialog displays and prompts you to confirm the delete
action. Click Yes to delete the files.
17 Specify when to connect by selecting one or both of these options:
Option Description
Connect when the wizard Select this box to connect to the database when you
completes complete the profile.
Connect every time the Select this box to connect to this database each time you
workbench is started launch the workbench.
18 Click Next to view the Summary information for this connection profile.
19 Click Finish to create the connection profile and display it in Data Source Explorer.
Related Topics
Adding a New Teradata Driver Definition, on page 42
Driver Definitions
c Click the JAR List tab and add the list of Teradata JDBC Driver JARs.
If you need to locate your Teradata JDBC Driver JAR files on the file system, click Add
Jar/Zip.
d Click the Properties tab to edit the JDBC driver properties.
e Click OK to save your new Teradata Driver definition and return to the New Teradata
Connection Profile wizard.
The new driver definition is now selected in the Select a driver from the drop-down
list.
b Click OK.
Also the Enter JDBC Property Value dialog displays if you click Click to enter value in
the Select Property Value field.
4 [Optional] To manually enter a JDBC property that is not in the properties list, select the
property called USER_ENTERED_PROPERTY and create a new property name value
pair.
a In the New JDBC Property dialog, in Property Name, enter the name for the new
JDBC property.
b In Property Value, enter the value for the new JDBC property.
c Click OK.
5 Click OK.
The JDBC property value pair is added to the JDBC Connection Properties.
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 Teradata 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.
launches a new background job to create a new database cache file, and refreshes the list of
databases.
You can also refresh the database cache by deleting the database cache files in the Teradata
JDBC Connection Properties dialog. Click Delete Cache Files to delete the database cache
files. The Data Source Explorer shows any changes to the database objects. A subsequent
refresh of the Databases folder loads the database from the database cache file.
QueryBand Preferences
Options Descriptions
Use 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 per
connection.
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. You
can specify this query band when you create the connection profile for a
Teradata Database.
An Aster Database connection profile defines the JDBC information required to connect to
an instance of an Aster Database on your system. It contains information such as the
database server name, user name and password required to establish the connection, port
number, JDBC connection properties, and schema cache properties.
Related Topics
Creating an Aster Database Connection Profile, on page 46
About Caching Aster Schemas, on page 51
Connection Properties
Option Description
Select a driver from the drop- The Aster Embedded JDBC Driver template is selected as the
down default JDBC driver template.
Database Server Name Name of the database server that hosts the Aster Database.
User Name Aster database user name used to connect to the database server.
Password Password required to access the Aster database defined in this
Connection Profile.
Port Number Port number to use for the Aster database 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.
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.
Button Description
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
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 connects to the desired
Aster database.
Option Description
Test Connection Tests the connection.
a Click Add.
The Add JDBC Property dialog opens.
b To enter a new JDBC property, select USER_ENTERED_PROPERTY.
c In the New JDBC Property dialog define a new property by typing a name in
Property Name.
d Type the paired value for the new property in Property Value and click OK.
e Click OK.
The new property value displays in JDBC Connection Properties.
f Click Save Properties to save the JDBC property.
Note: If the property already exists in the list, a confirmation dialog displays. Click
OK to replace the JDBC property in the list.
15 Repeat the above steps to add multiple properties.
16 [Optional] Click Cache Properties to configure schema cache properties.
17 [Optional] Click Delete Cache Files to delete cached files stored in Aster Database
server.
18 Specify when to connect by selecting one or both of these options:
Option Description
Connect when the wizard Select this box to connect to the database when you
completes complete the profile.
Connect every time the Select this box to connect to this database each time you
workbench is started launch the workbench.
Related Topics
Caching Aster Schemas, on page 52
Deleting Aster Cache Files, on page 54
You can add JDBC connection properties when you create or edit a connection profile. You
also can edit JDBC properties at any time from Data Source Explorer. The Add button is
located on the right side of the JDBC Connection Properties display area.
1 Right-click an Aster Database connection profile in Data Source Explorer.
The Aster Database Connection dialog opens.
2 Click Add.
The Add JDBC Property dialog opens and displays a list of JDBC properties and values
that you can add to the connection profile.
3 Under JDBC Properties, select the property you want to add.
4 (Optional) To manually enter a JDBC property that is not listed, select
USER_ENTERED_PROPERTY.
a In the New JDBC Property dialog define a new property by typing a name in
Property Name.
b Type the paired value for the new property in Property Value and click OK.
The property value displays in the Select Property Value field as
<name_property>=<property_value>.
5 Click OK.
The new property value displays in JDBC Connection Properties.
6 Click Save Properties to save the JDBC property.
Note: If the property already exists in the list, a confirmation dialog displays. Click OK
to replace the JDBC property in the list.
7 Repeat the above steps to add multiple properties.
When you create the Connection Profile for an Aster Database, you also can create a new
driver definition for that database.
1 Open the Data Source Explorer.
2 Right-click Database Connection and select New.
The New Connection Profile wizard opens.
3 Under Connection Profile Types, select Aster Database.
You can view a smaller list of databases by typing a character string on which to filter the
list, and then selecting the database for the Connection Profile.
4 In the Name field, type a name for the Connection Profile or accept the default name.
5 [Optional] Type a comment or description of the profile you are creating.
6 Click Next.
7 Click the asterisk button ( ) to add a new driver definition.
The Aster Embedded JDBC Driver template is selected as the default JDBC driver
template in the Select a driver from the drop-down list.
8 Select the Aster External JDBC Driver template then enter the new Driver name.
9 Click the Jar List tab and add the list of Aster JDBC Driver JARs.
Locate your Aster JDBC Driver JAR files on the file system by clicking Add Jar/Zip.
10 Click the Properties tab to edit the JDBC driver properties.
11 Click OK to save your new Aster Database Driver definition and return to the New
Connection Profile wizard.
Your new driver definition is now selected in the Select a driver from the drop-down
list.
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.
Actions
Option Description
OK Saves changes and closes the New JDBC Property dialog.
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 create a user-defined name/value property pair
in the New JDBC Property dialog.
Actions
Option Description
OK Closes the Add JDBC Property dialog.
When working with Aster databases, you can designate specific schemas to be cached.
Caching Aster schemas creates a schema cache file that contains the metadata for the
schema. The metadata describe the schema tables, columns, constraints, indexes, mr
functions, views, and so forth.
Cached schema are associated with a Connection Profile. If you delete the Connection
Profile, the Schema Cache list and any schema cache files associated with that Connection
Profile are also deleted.
You can cache Aster schema and set cache properties when you:
Create a new Connection Profile - Select cache schemas when you create a new
Connection Profile using the New Aster Connection Profile wizard. See Caching Aster
Schemas.
Edit existing cache schema list - Modify Aster cache properties from the Data Source
Explorer. See Editing Aster Cache Schema Properties.
Each cached Aster schema node in the Data Source Explorer is indicated by an icon.
When you connect to the Aster database and open the Schemas folder, a schema cache file is
created in a background job. You can view the progress of the schema cache job in the
Progress Monitor view by selecting Window > Show View > Other > General > Progress
and click OK.
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.
Related Topics
About Refreshing Schema Cache, on page 53
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
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.
Actions
Use the buttons at the bottom of the Select Schema text area to manage the schema selection
list.
Option Description
Select All Selects all schema in the list.
Clear All Clears all schema from the list.
OK Saves changes and closes the dialog.
Option Description
Single selection Selects an individual schema.
Select all Selects all schema names in the list.
Clear all Clears all schema names from the list.
4 Click OK.
5 If you are prompted with a message asking if you want to reconnect to the server, click
OK.
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.
Related Topics
Aster Database Connection Properties, on page 45
Editing Aster Cache Schema Properties, on page 53
Hadoop Connectivity
1 Open the Data Source Explorer, right-click the Database Connections folder and select
New.
You can also click in the main toolbar. The New Connection Profile wizard opens.
2 Under Connection Profile Types, select Hadoop Generic System from the list.
3 Type a Name that helps you identify this Connection Profile definition.
4 [Optional] Type a brief Description for this specific Connection Profile definition.
5 Click Next.
6 Enter the credentials required to access the Hadoop system:
a In WebHDFS Host Name, type the host name or IP address of the system configured
to provide access to the Hadoop systems's distributed file system.
b In WebHDFS Port Number, type the port number to use to communicate with the
Hadoop system's WebHDFS service.
c In WebHDFS User Name, type the user name with permissions to access the
WebHDFS host.
7 Specify when to connect to this Hadoop system by choosing these options:
Option Description
Connect when the wizard completes Connects immediately after you click Finish. This is
the default.
Connect every time the workbench is Connects each time you connect to your Eclipse
started workbench.
When creating Hadoop Hortonworks connection profiles, you can select different
connection options based on your current system connection setup and your data transfer
needs.
Connection Option Description
Knox Gateway Select this option if you currently connect to your
Hortonworks Hadoop System through a Knox Gateway. The
Apache Knox Gateway is a REST API gateway for interacting
with Hadoop clusters.
TDCH Select this option if you plan to use this connection for data
transfers between the Hortonworks Hadoop System and a
Teradata Database. Teradata Connector for Hadoop (TDCH)
enables you to move data between Teradata Databases and
Hadoop systems.
JDBC 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.
SQL-H Select this option if you plan to use this connection for data
transfers from the Hortonworks Hadoop System to an Aster
Database.
3 Under Connection Profile Types, select Hadoop Hortonworks from the list.
4 Type a Name that helps you identify this Connection Profile definition.
5 [Optional] Type a brief Description for this specific Connection Profile definition.
6 Click Next.
7 In Connection Properties, select Knox Gateway.
8 [Optional - not available in Studio Express] Select these additional connection options if
needed:
Option Description
TDCH (Teradata Data Teradata Connector for Hadoop enables you to move data
Transfers) between Teradata Databases and Hadoop systems.
SQL-H (Hadoop to Aster SQL-H enables you to transfer data from the Hortonworks
Data Transfers) Hadoop System to an Aster Database.
Option Description
Connect when the wizard completes Connects immediately after you click Finish. This is
the default.
Connect every time the workbench is Connects each time you connect to your Eclipse
started workbench.
10 Click Next.
11 Enter the credentials required to access the Knox connection.
b In Gateway Port Number, type the port number for the host.
d In 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 you entered in the last step.
g [Optional] Click Test Connection to verify the connection is successful.
12 Click Next.
A Summary of the information you entered in the previous steps displays.
13 Click Finish.
If the connection succeeds, the new Hadoop Hortonworks connection profile displays in
the Database Connections list in Data Source Explorer.
Option Description
Connect when the wizard completes Connects immediately after you click Finish. This is
the default.
Connect every time the workbench is Connects each time you connect to your Eclipse
started workbench.
10 Click Next.
11 If you select to connect using only TDCH, or (optional) TDCH with JDBC and/or SQL-
H, enter the following credentials to access the Hadoop system:
a In WebHDFS Host Name, type the host name or IP address of the system configured
to provide access to the Hadoop systems's distributed file system.
b In WebHDFS Port Number, type the port number to use to communicate with the
Hadoop system's WebHDFS service. For Hortonworks, this port is 50070 by default.
c In WebHDFS User Name, type the user name with permissions to access the
WebHDFS host.
b In Gateway Port Number, type a port number to use to access the host.
d In 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 you entered in the last step.
g [Optional] Click Test Connection to verify the connection is successful.
h Click Next.
TDCH connection properties are generated based on the Knox properties you enter
and display in the TDCH Connection Properties TDCH Connection Properties
screen. You cannot edit the TDCH connect properties.
13 [Optional] If you select to connect using TDCH and JDBC, complete step 10 and then
enter the connection credentials for JDBC.
a In WebHCat Host Name, type the host name or IP address of the Apache HCatalog
system that manages the metadata services for your Hadoop system.
b In WebHCat Port Number, type the port number to use to communicate with the
WebHCat host.
c In WebHCat User Name, type the user name with permissions to access the
WebHCat host.
d [Optional] Click Test Connection to verify the connection is successful.
e Click Next.
f In JDBC Host, type the host name of the Hadoop System to which to connect.
g In JDBC Port Number, type the port number to use to communicate with the host.
i In JDBC User Name, type the user name to use to connect to the database.
j In JDBC Password, type the password required to access the database using Hive
JDBC.
k Select Save Password to save the password you enter in the previous step.
l Select HTTP Transport Mode to transfer data using the HTTP secure transfer mode.
m In HTTP Path type the HTTP server path. The default value is cliservice.
Option Description
Connect when the wizard completes Connects immediately after you click Finish. This is
the default.
Connect every time the workbench is Connects each time you connect to your Eclipse
started workbench.
10 Click Next.
11 [Optional - not available in Studio Express] If you specify TDCH with JDBC, complete
the properties for the TDCH connection.
a In WebHDFS Host Name, type the host name or IP address of the system configured
to provide access to the Hadoop systems's distributed file system.
b In WebHDFS Port Number, type the port number to use to communicate with the
Hadoop system's WebHDFS service. For Hortonworks, this port is 50070 by default.
c In WebHDFS User Name, type the user name with permissions to access the
WebHDFS host.
d [Optional] Click Test Connection to verify the connection is successful.
e Click Next.
12 Specify the WebHCat properties.
WebHCat properties are required for JDBC and SQL-H connections. SQL-H connection
is not available in Studio Express.
a In WebHCat Host Name, type the host name or IP address of the Apache HCatalog
system that manages the metadata services for your Hadoop system.
b In WebHCat Port Number, type the port number to use to communicate with the
WebHCat host.
c In WebHCat User Name, type the user name with permissions to access the
WebHCat host.
d [Optional] Click Test Connection to verify the connection is successful.
e Click Next.
13 Specify the JDBC connection properties.
a In JDBC Host, type the host name of the Hadoop System to which to connect.
b In JDBC Port Number, type the port number to use to communicate with the host.
d In JDBC User Name, type the user name to use to connect to the database.
e In JDBC Password, type the password required to access the database using Hive
JDBC.
f Select Save Password to save the password you enter in the previous step.
g Select HTTP Transport Mode to transfer data using the HTTP secure transfer mode.
h In HTTP Path type the HTTP server path. The default value is cliserver.
15 Click Finish.
If the connection succeeds, the new Hadoop Hortonworks connection profile displays in
the Database Connections list in Data Source Explorer.
Option Description
Connect when the wizard completes Connects immediately after you click Finish. This is
the default.
Connect every time the workbench is Connects each time you connect to your Eclipse
started workbench.
10 Click Next.
11 If you specify only SQL-H, complete the following connection credentials:
a In WebHCat Host Name, type the host name or IP address of the Apache HCatalog
system that manages the metadata services for your Hadoop system.
b In WebHCat Port Number, type the port number to use to communicate with the
WebHCat host.
c In WebHCat User Name, type the user name with permissions to access the
WebHCat host.
d [Optional] Click Test Connection to verify the connection is successful.
12 [Optional] If you specified TDCH and SQL-H, enter the WebHDFS properties for the
TDCH connection.
You are asked to complete the TDCH credentials first and then the SQL-H connection
credentials.
a In WebHDFS Host Name, type the host name or IP address of the system configured
to provide access to the Hadoop systems's distributed file system.
b In WebHDFS Port Number, type the port number to use to communicate with the
Hadoop system's WebHDFS service. For Hortonworks, this port is 50070 by default.
c In WebHDFS User Name, type the user name with permissions to access the
WebHDFS host.
d [Optional] Click Test Connection to verify the connection is successful.
e Click Next.
b In JDBC Port Number, type the port number to use to communicate with the host.
d In JDBC User Name, type the user name to use to connect to the database.
e In JDBC Password, type the password required to access the database using Hive
JDBC.
f Select Save Password to save the password you enter in the previous step.
g Select HTTP Transport Mode to transfer data using the HTTP secure transfer mode.
h In HTTP Path type the HTTP server path. The default value is cliservice.
Foreign Servers
The Data Source Explorer displays the connections to foreign server objects. The foreign
server object contains the connection details to a remote database system. It also defines
associations with table operators that provide the ability to import and export data.
When you select a foreign server in the Foreign Server folder, the server details display in
the Object Viewer.
Use the Foreign Server object form to create a foreign server and to associate table operators
with the server. The form enables you to create multiple server objects for the same remote
database and customize each server with different characteristics based on the server's
purpose.
Using Pairs Specify the global name value pairs that the table operators use to
connect to this foreign server. Based on information you entered in the General
tab, using pairs display for the host type, remote server, and port.
Import Specify the local name value pairs to associate with the specified
IMPORT table operator.
Export Specify the local name value pairs to associate with the specified
EXPORT table operator.
SQL Review the generated CREATE FOREIGN SERVER or ALTER
FOREIGN SERVER statement that is based on the selections you make.
Action Bar
The action bar in the upper right corner enables these functions:
Commit Executes the SQL that creates or alters the foreign server. Commit is
disabled until you enter all required fields in the General tab.
Reset Clears all values entered in the form.
To define a foreign server, you must have CREATE SERVER privilege on the database that
stores the server objects. To associate a server with table operators, you must also have
EXECUTE FUNCTION and SELECT privileges on the specified table operators.
1 In Data Source Explorer, click the Foreign Servers node.
The Foreign Server tab appears in the Object Viewer.
2 Do one of the following:
In the Object Viewer toolbar, click (Create Foreign Server).
In the Data Source Explorer, right-click the Foreign Servers node and select Create
Foreign Server.
The Create Foreign Server form displays.
3 Click General.
a In Name, type the name of the foreign server object; for example,
hcatalog_server.
b In Host Type, specify the type of the host; for example, hadoop.
c In Remote Server, type the DNS host name or IP address of the foreign server.
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.
b In Authorization Name, type the name for the authorization.
5 Click Using 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. The pairs are global attributes of the server object.
To add or replace a name value pair, type a name in the Name column and the value
in the Value column, and click Add.
To remove a pair, select the name value pair and click Remove.
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.
The name value pairs that you create for importing data are local attributes of the
IMPORT table operator.
a In Database Name, 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.
c In Using Pairs, use the Add, Remove, Up, and Down buttons to create a list of name
value pairs that this table operator uses to import data.
7 [Optional] Click Export to associate an EXPORT table operator with this foreign server
for exporting data out of Teradata Database.
The name value pairs that you create for exporting data are local attributes of the
EXPORT table operator.
a In Database Name, type the name of the database that contains the export table
operator.
b In Table Operator, type the name of the table operator to use.
c In Using Pairs, use the Add, Remove, Up, and Down buttons to create a list of name
value pairs that this table operator uses to export data.
8 Click SQL to view the generated DDL that creates the foreign server.
9 Click Commit to execute the generated DDL statement that creates the foreign server.
You can modify certain attributes of an existing foreign server object, such as the name value
pairs associated with the server.
c In Using Pairs, use the Add, Remove, Up, and Down buttons to create a list of name
value pairs that this table operator uses to import data.
7 [Optional] Click Export to associate an EXPORT table operator with this foreign server
for exporting data out of Teradata Database.
These name value pairs are local attributes of the EXPORT table operator.
a In Database Name, type the name of the database that contains the export table
operator.
b In Table Operator, type the name of the table operator to use.
c In Using Pairs, use the Add, Remove, Up, and Down buttons to create a list of name
value pairs that this table operator uses to export data.
8 Click SQL to view the generated DDL that changes the foreign server definition.
9 Click Commit to execute the generated DDL statement that alters the foreign server.
Project Explorer
The Project Explorer provides a hierarchical view of the Projects you've created and their
resource files. You can use the Project Explorer to select SQL files for editing or create new
SQL files.
To open the Project Explorer, select Window > Show View > Project Explorer.
The Data Source Explorer Load Preferences enable you to configure your preference
settings for loading database and user objects and to determine what folders are shown in
the Data Source Explorer hierarchical tree display. You can set preferences to:
Load databases and users:
All databases and all users
Load only databases and certain users
Load all databases and users with PermSpace configured
Configure the hierarchical display to show:
All databases and all users
Only certain folders you specify
Whether to load object details for:
Table space and journals
Column data types in views.
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 Loads all databases and the DBC user, but no other user objects.
DBC user)
Only Databases (but include Loads all databases, the DBC user, and the current user.
DBC 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
Hierarchical Display view. Option selected by default.
Include Database Indexes Folder Displays index objects in the Indexes folder. Option selected by
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 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
Folder Types 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.
Actions
Use the action buttons at the bottom of the dialog to select, clear, apply, and save your
settings.
Option Description
Select All Click to select all options to load and display.
Clear All Click to clear your selections.
Restore Defaults Click to reset and restore default selections.
Apply Click to apply your changes.
OK Click 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.
Use Data Source Explorer Load Preferences to configure your preference settings for
loading database and user objects in Data Source Explorer (DSE). You can also set
preferences to determine what folders are shown in the hierarchical display.
1 Click Window in the top menu and select Preferences.
2 Expand Teradata Datatools Preferences.
3 Select Data Source Explorer Load Preferences.
4 Under Load options for the Data Source Explorer What to load, select the objects to
load:
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
PermSpace configured.
Option Description
Show Databases and Users in Displays database and user objects in an expandable
Hierarchical Display hierarchical view. Option selected by default.
Include Database Indexes Displays index objects in the Indexes folder. Option selected
Folder by 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-
Functions Folder Defined 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.
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.
You can add databases to display in the Data Source Explorer. The DBC database is always
loaded and does not need to be added.
You can remove databases in the Data Source Explorer (DSE) hierarchical tree.
1 In Data Source Explorer, right-click the name of the database to remove.
2 Select Teradata > Remove Database.
The selected database disappears from the DSE tree.
This feature is available for Teradata Databases displayed in the Data Source Explorer. In
the Data Source Explorer Load Preferences, be sure you select the Show Databases and
Users in Hierarchical Display check box to display databases.
1 Right-click the Databases folder.
2 Select Teradata > Set Root Database for DSE.
The Set Root Database for DSE dialog appears.
3 In Root, type the name of the root database to load and display in the Data Source
Explorer hierarchical tree display.
4 Click OK.
The database root displays in parenthesis in the Databases folder name.
Object Viewer
The Object Viewer provides detailed information about database objects you select either in
Data Source Explorer or in the Object Viewer. The Object Viewer automatically displays
when you select the Teradata Administrator perspective. To open it in a different
perspective, select Window > Show View in the menu toolbar.
You determine which objects display in the Object Viewer by setting preferences to
customize the viewer.
Option Description
Find Names that Type the starting characters of the object names you want to display.
Start with:
Find Names that Type the ending characters of the object names you want to display.
End with:
Find Names that Type characters used in the name of the objects you want to display. When
Contain: typing more than one character, do not use spaces and type characters in
the exact sequence they occur in the object name. The Object Viewer
filters on the occurrence of characters exactly as you type them. For
example, typing m or ma filters for words such as macro, but typing mr or
m r does not filter for the word macro.
The Object Viewer filters only for those names in the object list that match the name criteria
you specify.
Actions
Click toolbar icons to perform tasks. You also can access actions from a drop-down menu.
Click at the right end of the toolbar to expand menu options.
Icon Menu Description
Pin Pins the selected object to the view.
Pinning an object means that the tabbed view for the
object is retained when you select another object to
display. When the pinned object view is selected, the
icon appears in a highlighted box.
Restore Tabs Refreshes the Object Viewer to display hidden tabs.
Tabs might be hidden as the result of filters.
Administer Profiles Opens the Administer Profiles - General Information
dialog to create or to modify user profiles.
Administer Roles Opens the Administer Roles - User Members dialog to
create new roles and to assign roles to users.
Show Interdependencies Opens the Interdependency Browser and shows the
interdependencies for the selected object.
Create Table Opens the Create Table - Table Columns Definition
dialog to create a Table object in the current database.
Create View Opens the Create View - View Query Specification to
create a new View object.
Create View of Table or Opens the Create View - Base View Definition to
View create a View object using the selected Table or View
object.
Modify Opens the Create View - View Query Specification to
edit View objects in the SQL Editor tab.
Create Macro Opens the Create Macro - Routine Parameters dialog
to create a Macro object in the current database.
Create Procedure Opens the Create Stored Procedure - Routine
Parameters dialog to create a Stored Procedure object
in the current database.
Create Trigger Opens the Create Trigger - Trigger Specification
dialog to create a Trigger object for the selected table.
Create a SQL User- Opens the Create User Defined Function - Routine
Defined Function Parameters dialog to create a User-Defined Function
(UDF) object in the selected database.
Use the Minimize and Maximize icons at the far right to resize the Object Viewer.
The Object Viewer shows information about the databases in the Connection Profile you
select to browse in the Data Source Explorer. Different information displays in the Viewer
depending on the type of object you select and whether you want to view summary
information or specific object details.
To view summary information about the objects in a database, open the Data Source
Explorer and select a node such as Databases, Tables, or Stored Procedures. The Object
Viewer displays information that lists the objects in that node with their properties.
To view detailed information about a specific object, click an object name displayed in the
Object Viewer object list or select the object from the Data Source Explorer tree. A new
tabbed view opens for that object.
Databases View
The Databases tab displays a list of database objects defined in the Connection Profile
database. Double-click any name in the Database Name column to display information
about a specific database. The name of the connected database displays on the tab label
(database_name Databases). The view shows the following information:
Option Description
Database Name Name of the database.
Type Teradata Database type is a Database or User.
Fallback Indicates if the database has fallback protection by default for
tables created in this database.
Before Journal Type (if any) of before-change images maintained by default for
data tables created in the database. The values are No, Yes or
Dual.
After Journal Type (if any) of after-change images maintained by default for
data tables created in the database. The values are No, Yes, Local
or Dual.
Option Description
Comments Comments about the database.
Toolbar
Click the Databases node in the Data Source Explorer to display a list of users and
databases for the connected system. You can create new databases and users. New objects
display in both the Data Source Explorer tree and in the List of databases in the Object
Viewer.
Indexes View
The Indexes tab contains a list of hash and join indexes defined in the selected database. You
can display index details by double-clicking an index name in the list. Index information
displays in a separate tabbed view.
Option Description
Index Name Name of the index.
Index Type Type of the index.
Comments Text description or comments about the index object.
Toolbar
Click an Indexes node to view a list of database indexes and their properties. If you click an
index name under an Indexes node, the toolbar options expand to include the following:
Macros Tab
Double-clicking a Macros node in the Data Source Explorer displays a list of macros used
by the database in the Object Viewer.
Option Description
Macro Name Name of the macro.
Access Count Number of times the macro was accessed since the last counter
reset.
Last Access Date Date on which the macro was last accessed.
Creator Name Name of the creator of the macro.
Comments Text description or comments on the macro object.
Toolbar
Click a Macros node in the Data Source Explorer.
Toolbar
Click a Stored Procedures node in the Data Source Explorer.
Tables View
The Tables tab lists the tables defined in the selected database. Double-clicking an entry
displays the details of the selected table in the Object Viewer.
The tab includes the following table information:
Option Description
Table Name Name of the database table.
Current Perm Amount of current permanent space usage of the table in bytes.
Peak Perm Amount of peak permanent space usage of the table in bytes.
Skew Factor Skew factor of the table. It indicates if the table row data is evenly
distributed on Teradata AMPs. If the data is skewed, some AMPs
have more rows and others have less. Skewing impacts the
performance of a Teradata Database.
Journal Table Database Name of the database that contains the journal table (if any) for
this table.
Journal Table Name of the journal table (if any) for this table.
Creator Name Name of the creator of the table.
Version Number of versions for the table.
Queue Values are Y (Yes) or N (No). Value indicates if this table is a
queue table.
Fallback Values are Y (Yes) or N (No). Value indicates if this table is
enabled for Fallback operations.
No Pi Values are Y (Yes) or N (No). Value indicates whether the table is a
"No Primary Index" table or not.
Last Access Date Date on which the table was last accessed.
Access Count Number of times the table was accessed since the last counter
reset.
Comments Comments about the table.
Toolbar
The toolbar options let you create a new table and create views for tables or views.
Views View
The Views tab contains a list of views defined in the selected database.
Option Description
View Name Name of the view.
Comments Text descriptions or comments about the view.
Toolbar
Click a Views node in the Data Source Explorer. Use the toolbar to create a new view,
modify an existing view, or create a view based on an existing view or table.
Tables Tab
The Tables tab contains a list of tables defined in the selected Database/User. You can display
table details by double-clicking a table name in the list. Table information displays in a
separate tabbed view.
Option Description
Table Name Name of the database table.
Current Perm Amount of current permanent space usage of the table in bytes.
Peak Perm Amount of peak permanent space usage of the table in bytes.
Skew Factor Skew factor of the table. It indicates if the table row data is evenly
distributed on Teradata AMPs. If the data is skewed, some AMPs have
more rows and others have less. Skewing impacts the performance of a
Teradata Database.
Journal Table Name of the database that contains the journal table (if any) for this table.
Database
Journal Table Name of the journal table (if any) for this table.
Creator Name Name of the creator of the table.
Version Number of versions for the table.
Queue Values are Y (Yes) or N (No).
Fallback Values are Y (Yes) or N (No). Value indicates if this table is enabled for
Fallback operations.
No Pi Values are Y (Yes) or N (No). Value indicates whether the table is a "No
Primary Index" table or not.
Last Access Date Date on which the table was last accessed.
Access Count Number of times the tables was accessed since the last counter reset.
Comments Comments about the table.
Macros Tab
The Macros tab contains a list of the macros used in the selected Database/User object. You
can display macro details by double-clicking a macro name in the list. Macro information
displays in a separate tabbed view.
Option Description
Macro Name Name of the macro.
Access Count Number of times the macro was accessed since the last counter reset.
Last Access Date Date on which the macro was last accessed.
Creator Name Name of the creator of the macro.
Comments Text describing or commenting on the macro object.
Procedures Tab
The Procedures tab contains a list of the stored procedures used in the selected Database/
User object. You can display procedure details by double-clicking a stored procedure name
in the list. The Stored Procedure object information displays in a separate tabbed view.
Option Description
Procedure Name Name of the stored procedure.
Parameter Types Lists the types of parameters used by the procedure; for example, INTEGER and
VARCHAR(200).
Language Programming language used to write the procedure; for example, SQL and JAVA.
SQL Data Access Type of SQL data access performed by the procedure; for example, MODIFIES
SQL DATA.
Access Count Number of times the procedure was accessed since the last counter reset.
Creator Name Name of the creator of the procedure.
Comments Text describing or commenting on the corresponding Macro object identified by
the Macro Name.
Indexes Tab
The Indexes tab contains a list of hash and join indexes defined in the selected database. You
can display index details by double-clicking an index name in the list. Index information
displays in a separate tabbed view.
Option Description
Index Name Name of the index.
Index Type Type of the index.
Comments Text describing or comments about the index object.
Jars Tab
The Jars tab contains a list of JARs defined in the selected database. You can display JAR
details by double-clicking the Jar ID in the list. JAR information displays in a separate tabbed
view.
Option Description
Jar ID Unique identifier for the JAR file.
Java Routine References Number of Java routines that reference the JAR file.
References Jar Count Number of other JAR files referenced by this JAR file.
Referenced By Jar Count Number of JAR files that reference this JAR file.
UDFs Tab
The UDFs tab contains the list of user-defined functions used in the selected database.
Double-click a function name to display information about individual functions. Details
display in a separate tabbed view.
Option Description
Function Name Name of the user-defined function.
Specific Name Specific name of the user-defined function.
Option Description
Return Types] Type of the value returned from the user-defined function.
Parameter Types Comma-separated list of the types of the parameters in the user-defined function.
Language Language in which the procedure is written. This could be SQL, C or Java.
SQL Data Access The user-define function's SQL data access.
Access Count Number of times the function was accessed since the last counter reset.
Last Access Date Date that the user-defined function was last accessed.
Creator Name Name of the creator of the user-defined function.
Comments Comments about the user-defined function.
Privileges Tab
The Privileges tab contains a list of Users who are granted privileges to the selected
database.
Option Description
User Name of the User.
Privilege Type of privilege granted, such as Create User or Drop View.
Grantable Checkmark indicates the User is able to grant the privilege to others.
Grantor Name of the User that grants the privilege.
Option Description
Rule Type Type of logging rule that applies to the application, user, or account.
What is Logging Summary statistics.
Option Description
User Name Name of the user who has column rights for columns in the selected table.
Database Name Name of the database that contains the table with column rights.
Table Name Name of table in the database on which user has column rights.
Column Name Name of the column in the table for which the user has rights.
Privilege Type of privilege granted.
Grantable Check mark indicates that the user has rights to grant the privilege to others.
Parameters
Option Description
Position Position in the procedure where the parameter is
declared. Positions are indicated by numeric
values, such as 1, 2, 3, and indicate the relative
order of the parameter in relationship to other
parameters declared by the procedure.
Name Name of the parameter.
Parameter Type Data type of the parameter.
Mode Mode of the parameter. Values are IN and
INOUT.
Comments Comments about the parameters in the
procedure object.
Details
The Details tab displays the attribute information for the selected table, such as name, and
the value for that attribute.
Option Description
Attributes Property or characteristic of the table. Attributes
include:
Value Value associated with the attribute, such as the
specific alphanumeric characters assigned as its
name.
Attributes are:
Option Description
Name Name of the stored procedure object.
Option Description
Parameter Type Lists the types of parameters used by the
procedure; for example, INTEGER and
VARCHAR(200).
Language Programming language used to write the
procedure; for example, SQL and JAVA.
SQL Data Access Type of SQL data access performed by the
procedure; for example, MODIFIES SQL DATA.
Comments Comments about the parameters in the
procedure object.
SQL
The SQL tab shows the SQL statements that executes to create the object. You cannot edit the
SQL that displays.
Privileges
The Privileges tab contains a list of Users who are granted privileges on the selected stored
procedure.
Option Description
User Name of the User.
Privilege Type of privilege granted, such as Drop
Procedure and Execute Procedure.
Grantable Check mark indicates the User is able to grant the
privilege to others.
Grantor Name of the User that grants the privilege.
Users
The Users tab contains a list of the users for the selected procedure. You can display details by
double-clicking a User in the list. The information displays in a separate tabbed view.
Option Description
User Name of the user.
Parameters Tab
Callable macros may have parameters. The Parameters tab lists any parameters used by a
macro and the position where they are declared in the macro.
Option Description
Position Position in the macro where the parameter is declared.
Name Name of the parameter.
Parameter Type Data type of the parameter.
Comments Comments about the parameter.
Details Tab
The Details tab lists attributes for the macro, such as name, and the value for that attribute.
Option Description
Attributes Property or characteristic of the macro object, such as Name.
Value Value associated with the attribute, such as the specific alphanumeric characters
assigned as its name.
SQL Tab
The SQL tab displays the SQL code used to create the macro.
Privileges Tab
The Privileges tab lists the users who are granted privileges to use the macro and describes
the type of privilege and which user granted it.
Option Description
User Name of user or database granted privileges on the macro.
Privilege Type of privilege granted; for example, Execute.
Grantable Check mark indicates user can grant macro privileges to others.
Grantor Name of user or database that granted the privilege.
Users Tab
The Users tab lists the databases that use the macro.
Option Description
User Name of the database that uses the macro.
Columns Tab
The Columns tab that displays in the Object Viewer shows information about columns in a
database table object. This information is available when you select a table object from the
Data Source Explorer, on page 69 or from a list of tables in the Object Viewer.
Option Description
Position Position in the table where the column is
declared. The position is a numeric value that
indicates the relative position of the column to all
columns in the table. For example, position 1 is
the first column in the table.
Name Name of the column.
Type Data type of the column.
Access Count Number of times the object was accessed since
the last counter reset.
Last Access Date Date on which data in the column was last
accessed.
Format Default display format for the data in the
column; for example, if a date format, YYY-MM-
DD-HH:MI:SS.
Nullable Null code indicating whether the column can
have a null value or not:
Y - Yes
N - No
Char Set Type of character set; for example, LATIN or
UNICODE.
Default Value Any default value assigned to the column.
Column Title Column header associated with the column.
Comments Comments about the column.
Details Tab
The Details tab displays the attribute information for the selected table, such as name, and
the value for that attribute.
Attribute Description
Name Name of the table
Current Perm Current perm space usage of table in bytes
Peak Perm Peak perm space usage of table in bytes
Skew Factor Indicates if the table row data is evenly
distributed on Teradata AMPs. If the data is
skewed, some AMPs have more rows and others
have less. Skewing impacts the performance of a
Teradata Database.
Journal Table Database Name of database that contains the journal table
(if any) for the table
Attribute Description
Journal Table Name of the journal table (if any) for the table
Comments Comments about the table
Indexes Tab
The Table Indexes tab contains information about the indexes defined for the table. The tab
body has two sections. To display information in the Index Columns section, you must select
an index in the Table Indexes section.
Table Indexes
The Table Indexes section lists the indexes defined for the table. It contains the following
information:
Option Description
Name Name of the index. This field is blank if the index
is not given a name.
Index Type Type of the index. This field shows whether the
index is Unique or Nonunique and a Primary
Index or Secondary index.
Columns Comma-separated list of the names of the
columns that make up the index.
Index Columns
The Index Columns section displays the columns of the table that make up the index
selected in the Table Indexes section. It contains the following information:
Option Description
Name Name of the column that is a member of the
index.
Type Data type of the column; for example, BYTE(4).
Index Number Internal index number.
Access Count Number of times index column was accessed
since last counter reset.
Last Access Date Date on which the index column was last
accessed.
Comments Comments about the index column.
Constraints Tab
The Table Constraints tab contains information about the constraints defined for the
selected table. The tab body has two sections.
Table Constraints
The Table Constraints section lists the constraints defined for the table. It contains the
following information:
Option Description
Name Name of the constraint. This field is blank if the
constraint is not given a name.
Constraint Type Type of index that dictates the constraints:
Primary Key or Foreign Key.
Constraint Details
This section contains information about the constraint selected in the Table Constraints
section. It consists of two columns: Attribute and Value. The attributes of a constraint are
different depending on whether you select Primary Key or Foreign Key in the Constraint
Type column in the section above.
Primary Key
A primary key is the designated attribute in a table where unique values are used to
identify each row in the table. A primary key must not be null, have no duplicate values, and
only one primary key per table.
If Primary Key is the table constraint type, the following fields display:
Attribute Field Description of Value
Name Name of the constraint. This field is blank if the
constraint is not given a name.
Member Column Name and type of the column that is a member
of the primary key. There is a Member Column
field in the Constraint Details part of the tab for
each column that is part of the table primary key.
Foreign Key
A foreign key is one or more attributes in a table that relate to a primary key in another
table. A foreign key cannot have a non-null value without a corresponding value in the
primary key table. Duplicate values are allowed, and null values are allowed. A table can
have zero or more foreign keys. If Foreign Key is the table constraint type, the following
fields display:
Option Description
Name Name of the constraint. This field is blank if the
constraint is not given a name.
Referenced Table Name of the table that is referenced by the
Foreign Key. Double-clicking on this entry in the
details displays the referenced table in the Object
Viewer. For example
ARP_AAA1.ARPTBL_IT005 where ARP_AAA1
is the database name and ARPTBL_IT005 is the
table name.
Option Description
Referenced Index Name of the index in the referenced table that
the Foreign Key columns reference. Double-click
this entry in the details to display the referenced
index in the Object Viewer.
Referenced Constraint Not used.
Column Association This field is repeated for each column in the
Foreign Key constraint; for example, if there are
two columns, there is a Column Association1,
and Column Association2. The entry in the
Value column shows the name and type of the
column in the table followed by "->" and the
name and type of the column in the referenced
table that the column references. For example,
f1 SMALLINT ->
ARP_AAA1.ARPTBL_IT005.f1
SMALLINT The referenced column name is
given in the form database name.table
name.column name.
Triggers Tab
The Triggers tab contains information about the triggers defined for the selected database
table. Double-click an entry in the Trigger Name list to display information in the Object
Viewer about the selected trigger. The following information displays for each trigger object
you select.
Option Description
Trigger Name Name of the trigger.
Enabled Indicates if the trigger is enabled or disabled.
Action Time Indicates if the trigger runs before or after the
action shown in the Action Type column.
Action Type Indicates which action on the table causes the
trigger to run: UPDATE, INSERT. DELETE.
Granularity Indicates if the trigger code runs per statement or
per each affected row.
Order Order setting for the trigger. If no order was
specified for the trigger, the default value of
32767 is used.
Comments Comments about the trigger.
Option Description
VPro VProc number
Current Perm Current permanent space usage for the table object measured in bytes.
Peak Perm Peak permanent space usage for the table object measured in bytes.
SQL Tab
The SQL tab shows the SQL statements that executes to create the object. You cannot edit
the SQL that displays.
Privileges Tab
The Privileges tab contains a list of Users who are granted privileges on the selected
database.
Option Description
User Name of the User.
Privilege Type of privilege granted, such as Create User or
Drop View.
Grantable Check mark indicates the User is able to grant
the privilege to others.
Grantor Name of the User that grants the privilege.
References Tab
The References tab shows all views and macros that directly reference the selected table. The
References tab does not show indirect references to tables or views, such as when a macro
calls a view that is based on a table or another view. This lower-level table or view does not
display in the references report. The tab contains the following information:
Option Description
Database Name Name of database in which the reference object is
defined.
Object Name Name of the reference object.
Type Data type of the reference object.
Note: This feature is only available for users who have SELECT access on the dbc.DBase,
dbc.TVM, and dbc.TextTbl tables.
Statistics Tab
The Statistics tab displays statistics for unique values found in columns.
Option Description
Date Date statistic was collected.
Time Time statistic was collected.
Unique Values Unique values found.
Option Description
Column Names Name of column in which it was found.
Users Tab
The Users tab contains a list of the users for the selected Table object. You can display details
by double-clicking a User in the list. The information displays in a separate tabbed view.
Option Description
User Name of the user.
Parameters Tab
Option Description
Position Position within the function where the parameter
is declared. Positions are indicated by numeric
values, such as 1, 2, 3, and indicate the relative
order of the parameter in relationship to other
parameters declared by the function.
Name Name of the parameter.
Parameter Type Data type of the parameter.
Option Description
Comments Comments about the parameter.
Details Tab
Option Description
Attribute Description of option.
Value Description of option.
SQL
The SQL tab shows the SQL code used to create the object.
Source
The Source tab shows the external source of the user-defined function.
Option Description
Source Text box contains the source code for the
function.
Privileges Tab
Option Description
User Name of the database that runs the function.
Privilege Name of the privilege, such as Execute Function
or Drop Function.
Grantable Checkmark indicates the privilege can be granted
to others.
Grantor Name of the database that granted the privilege.
User
The User tab contains a list of the user databases that run the function.
Option Description
User Name of the User database that uses the user-
defined function.
Columns Tab
The Columns tab lists the columns defined in the selected View.
Option Description
Position Position of the column in the view. The first
column in the view is position 1; the second
column is position 2, and so forth.
Name Name of the column.
Type Data type of values in the column.
Comments Comments about the view column.
Details Tab
The Details tab lists attributes for the view, such as View Name, and the value for that
attribute.
Option Description
Attribute Property or characteristic of the view object, such
as View Name and Comments.
Value Value associated with the attribute, such as the
specific alphanumeric characters assigned as its
name.
SQL Tab
The SQL tab displays the SQL code used to create the view.
Privileges Tab
The Privileges tab lists the users granted privileges to use the view and describes the type of
privilege and which user granted it.
Option Description
User Name of user or database granted privileges on
the view.
Privilege Type of privilege granted; for example, Insert,
Delete, Drop View, or Update.
Grantable Check mark indicates user can grant view
privileges to others.
Grantor Name of user or database that granted the
privilege.
References Tab
The References tab lists the databases and objects that the view references.
Option Description
Database Name Database name of the object that the view
references.
Object Name Name of the object that the view references.
Option Description
Type Reference type name.
Users Tab
The Users tab lists the databases that use the view.
Option Description
User Name of the database/user that uses the view.
Data Utilities
Disk Cache
These settings apply to both Teradata Database and Aster Database.
Option Description
Root Directory Specify the root directory location. Accept the default
location or click Browse to specify a different
directory path.
File Extension Default is the .dat file extension. Accept the default
extension or type a different file extension.
File Encoding Select the file encoding standard you want used when
caching data.
Cache Threshold Default maximum cache size is 8192. To change the
cache threshold, type a new value.
Transaction Commit Size (rows) Default is the application default. Specify the number
of rows by selecting a number in the list or typing a
numeric value in the field.
Error File Path Of Smart/Fast Load Click Browse to select a file for SmartLoad and Fast
Load errors.
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.
Administration Dialogs
Administer Profiles
The Administer Profiles dialog enables you to create or modify user profiles. You must have
the CREATE PROFILE privilege to create a profile.
1. Under General Information in Profile Name, type a new profile name or select an
existing profile from the list.
2. Click any of the Administrator Profile tabs and complete the information. This
information automatically generates an SQL DDL statement that you can preview and
run in the SQL Preview tab.
Required Privileges
To You must have
Create a profile CREATE PROFILE
Add users to a profile DROP PROFILE
Drop a profile DROP PROFILE
When users log on after a profile drop, the system uses the password attribute setting defined
for the system. Spool and temporary space settings immediately change to the settings
defined for the affected users. Account and database settings change to the setting defined
for the affected users the next time the users log on or explicitly change the settings.
The effects of re-creating a profile with the same name as the dropped profile are not
immediate. The parameter settings in the re-created profile take effect the next time the
users who are assigned the profile log on.
General
The General tab enables you to manage information related to a database profile. You can:
Identify an account to charge for space usage.
Specify the default database to use.
Specify maximum allocation usage for spool and temporary space per user.
Write comments that assist management of the database and space usage.
Option Description
Account ID Identification (ID) for the account to be charged for the space used
by users with this profile. If the account ID is not defined in the
profile assigned to a user, Teradata Database uses the setting
defined for the individual user. The Account ID value must follow
the standard Teradata Database naming rules. You must separate a
list of account IDs by commas and enclose with left parenthesis
and right parenthesis characters. Accounts in a profile assigned to
a user override any accounts the user might have.
Default Database Selects the default database from the drop down list. If the default
database is not defined in the profile assigned to a user, Teradata
Database uses the setting defined for the individual user.
Spool Space The spool space for the profile. This is the maximum number of
bytes of spool space that can be used by any user who is assigned
to this profile. If the spool space is not defined, the Teradata
Database uses the setting defined for the individual user.
Temporary Space The temporary space for the profile. This is the maximum number
of bytes that can be used by temporary tables created by any user
who is assigned to this profile. If the temporary space is not
defined, the Teradata Database uses the setting defined for the
user.
Comment [Optional] Comments about the profile. Comment text is limited
to 255 characters.
Users In Profile
The Users In Profile tab enables you to assign users to a user profile. It consists of two
panels.
Panel Description
All Users Lists all users in the database.
Panel Description
Users in Profile Lists users in the database who are assigned to the profile. If you are
creating a new profile, the Users in Profile list is empty.
Note: You must have the CREATE PROFILE privilege to create a profile and the CREATE
USER or MODIFY USER privilege to add or remove users in the profile.
1 From the All Users list, select the users to assign to the profile and move them to the
Users in Profile list using the directional arrows.
The single arrow moves a single user; the double arrow moves multiple users.
2 Click the SQL Preview tab to view the generated SQL DDL statement.
When you add a user to a profile, a MODIFY USER AS PROFILE statement is generated
in the SQL Preview tab.
Password
The Password tab enables you to define the password settings for a database profile. The
password security attributes you define in this dialog take effect the next time the user logs
on.
Field Description
Minimum Length Minimum number of characters required for the password. This value
must be between 1 and 30.
Maximum Length Maximum number of characters allowed for the password. This value
must be between 1 and 30.
Expiration (days) Number of days allowed to elapse before the password expires. A value of
0 (zero) indicates the password never expires.
Maximum Log On Number of maximum log-on attempts allowed before locking the user
Attempts from further attempts. A value of 0 (zero) indicates to never lock the user.
Reuse (days) Number of days allowed to elapse before a password can be reused.
Locked User (minutes) Number of minutes to elapse before unlocking a locked user. Or select
Unlock Immediately to unlock the user immediately, or select Lock User
Indefinitely to lock the user indefinitely.
Allow User Name Allows the user name to be contained within the password. The default is
to not allow characters in a user name to be used in the password.
Note: If you select this option, then the alpha characters, special
characters, and mixed case characters options are automatically selected.
Search for Restricted Allows certain words to be restricted from use in a password. If checked,
Words any words listed in the DBC.PasswordRestrictions database view
cannot be used in the password.
Note: This feature is only available when you connect to a Teradata
Database 12.00.00 and later.
Field Description
Allowed - Allows digits in the password, but they are not required.
Not Allowed - No digits allowed in the password.
Required - Requires at least one digit in the password.
Special Characters Special characters are only pound sign (#), dollar sign ($), and
underscore (_), unless the password is enclosed in double quotes, in
which case other special characters can be used. Select an option:
Allowed - Allows special characters in the password, but they are not
required.
Not Allowed - No special characters allowed in the password.
Required - Requires at least one special character in the password.
Alpha Characters Select an option:
Allowed - Allows alphabetic characters in the password.
Required - Requires at least one alphabetic character in the password.
Mixed Case Characters Select an option:
Allowed - Allows a password to contain a mix of upper and lower-
case characters.
Required - Requires that the password be a mix of upper and lower-
case characters.
Clear Password Options Clears all password values in the dialog to NULL. Clearing password
options causes the Teradata Database to use the system settings for users
assigned to the profile.
SQL Preview
The SQL Preview tab displays the generated SQL CREATE PROFILE, CREATE USER AS
PROFILE, and MODIFY USER AS PROFILE statements required to create profiles and add
users to the profile. The text in the Generated SQL region of the tab is red if the definition is
incomplete or contains an error.
1 In Generated SQL, review the generated SQL DDL statements and verify that the
definition is accurate.
2 [Optional] Click any Administer Profiles tab to change the profile attributes defined in
the SQL statement.
Any changes you make automatically generate new SQL for your review.
3 Click any displayed error links below the generated SQL and correct the errors.
Error messages link to the field that contains the error.
4 Click one of the following:
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.
Run SQL Executes the SQL. This actions resets the Administer Profiles dialog.
Option Description
Show in Editor Displays the SQL statement in the SQL Editor. To edit the SQL, you must close
the Administer Profiles dialog.
Create Authorization
Authorizations make an association between a database user and an operating system server
user identification, allowing an external routine to run in secure mode using the context,
privileges, and access control accrued to the specified operating system user.
The Create Authorization dialog is divided into the following tabs:
Tab Description
Set Authorization Creates the association between a database user and an operating
system server user identification.
Display Authorization Displays database authorization details.
Field Description
Invoker Keyword associates an operating system user to the database user who
invokes an external routine. If Invoker is specified, then the Database
Name must be a Teradata user. Only one Invoker authorization name can
be assigned per database.
Default [Optional] Keyword modifier for the DEFINER keyword associates the
authorization with all external routines that do not specify the
authorization name in the EXTERNAL SECURITY DEFINER clause of
the following statements:
CREATE/REPLACE FUNCTION
CREATE/REPLACE FUNCTION (Table Form)
CREATE PROCEDURE (External Form)
Only one default DEFINER can be assigned per database. If a default
Definer already exists for the specified database, the CREATE
AUTHORIZATION request fails.
Domain Domain name for the user. This applies only to Teradata Databases running
on Windows.
User Name Name of an operating system user that is defined on every node of the
system. Must be a member of the tdatudf user group.
Password Password of this operating system user.
Note: Type the complete password. Do not use the Paste command. Do not
use the arrow keys or the mouse to navigate in this field.
The Grant, Revoke, or Display System Rights dialog enables you to grant, revoke, and
display system rights privileges on database users, roles, or user PUBLIC. It has two primary
tabs:
Grant/Revoke
SQL Preview
Grant/Revoke Tab
The tab contains the following elements and tabs:
Elements Description
To Objects Users(s) - Displays the database users list.
Roles(s) - Displays the database roles list.
Public - Displays only the PUBLIC user.
View Details Updates the Grant/Revoke/Display tabs with the system right
details based on selection of database objects.
Filter Privilege Filters the view to show only those system rights in grant/
revoke/display tabs selected from the filter privilege combo box.
Elements Description
Grant Grants system rights to database objects.
Revoke Revokes system rights from database objects
Display Displays the current system rights for the selected database
objects.
Display Tab
This tab contains the following fields:
Field Description
Details Displays the current privileges for the selected database object.
Grant Tab
The Grant tab displays the current grantable privileges on selected objects. To set system
rights, you move single or multiple privilege type(s) from the Grantable Privileges list to the
To be granted privileges list, and then click Grant.
1 In Grantable Privileges, review and then select the privileges to grant on objects you
selected in the To 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 using the following options:
Option Description
> Moves a single privilege from Grantable Privileges to To be granted.
< Moves a single privilege from To be granted to Grantable Privileges.
>> Moves multiple privileges from Grantable Privileges to To be granted.
<< Moves multiple privileges from To be granted to Grantable Privileges.
Option Description
With Grant Grants the WITH GRANT permission on the objects in the To be granted list.
All Children Grants the privileges to the children of the selected parent objects.
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.
Revoke Tab
The Revoke tab shows the list of available revocable privileges for the selected objects and
lets you specify which privileges to revoke from that object. You must click Revoke to revoke
the privileges on the objects you select.
Move privileges from the Revocable Privileges list to the To be Revoked list to indicate
which privileges are to be revoked for the selected object.
1 In Revocable Privileges, review and then select the privileges to revoke on objects you
selected in the To Objects section of the dialog.
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 by using the directional arrows:
Option Description
> Moves a single privilege from Grantable Privileges to To be granted.
< Moves a single privilege from To be granted to Grantable Privileges.
>> Moves multiple privileges from Grantable Privileges to To be granted.
<< Moves multiple privileges from To be granted to Grantable Privileges.
Option Description
With Grant Revokes the WITH GRANT privilege on objects in the To be revoked list. If
selected the WITH GRANT OPTION is added to the REVOKE request in the
generated SQL statement. If this option is chosen, only the GRANT capability is
removed, not the privilege.
All Children Revokes privileges for the children of the selected parent objects. If selected, the
ALL option is added to the REVOKE request in the generated SQL statement.
3 Click any displayed error links below the generated SQL and correct the errors.
Error messages link to the field that contains the error.
4 Check one of the following:
Option Description
Run SQL Executes the SQL when you click Finish.
Save SQL Saves the SQL statement to an SQL file that you choose by typing the file path or
clicking Select. The Save SQL dialog opens. Select a project folder and type a file
name, then click OK and click Finish.
The Display, Grant, or Revoke Privileges dialog enables you to display, grant, and revoke
privileges associated with database objects that are displayed in the Data Source Explorer.
You invoke the dialog by right-clicking a node in the Data Source Explorer and selecting
Teradata > Grant/Revoke > Privileges. Valid node objects are: databases, tables, views,
indexes, procedures, functions, and macros.
Grant/Revoke Tab
Element Description
Database The database containing the objects for which you want to grant or revoke
privileges.
Element Description
Object Type Selects a specific object in the database. Select a data type to filter from the
list, and then select the object from the filtered list of objects. The object you
select becomes the target of the GRANT or REVOKE privileges action you
perform.
To Object Filters the selection list on the following options:
Users - Filters the list to contain only users.
Roles - Filters the list to contain only roles.
Public - Filters the list to contain only the PUBLIC user (also contained in
the Users list).
You can then select an object from the filtered list.
Grant/Revoke Filter Type of privilege on which to filter.
Privilege
Display Tab
The Display tab displays the privileges that the selected user or role is granted for the
database objects selected.
Column name Description
Privilege Contains the name of the privilege.
Grantable Contains a check mark if the user can grant the privilege.
Grantor Contains the name of the user who granted the privilege to this user.
Public Contains a check mark if the user is granted the privilege through the
PUBLIC user.
The display of role privileges uses only one column for the sort. You can change the sort
order of all columns by left-clicking the header of the column on which you want to sort.
Note: It is possible for a privilege to be displayed twice if the user has been granted the
privilege through a non-PUBLIC user and the PUBLIC user.
Grant Tab
The Grant tab enables you to grant privileges to the selected user or role on the database
object. The Grantable Privileges list displays only the privileges that the logged-on user can
grant. If the user has the privilege but not GRANT rights, the privilege is still displayed in this
list so that the WITH GRANT OPTION option can be applied.
The Grant tab contains the following elements:
Element Description
Grantable Privileges Lists the privileges that can be granted.
To be Granted Lists the privileges that are to be granted.
Options Select check boxes to add options to the SQL GRANT request.
With Grant - If selected, the WITH GRANT OPTION clause is added
to the GRANT request.
All Children - If selected, the ALL clause is added to the GRANT
request.
Grant Grants the privileges listed in the To be Grated list.
Revoke Tab
The Revoke tab enables you to revoke privileges on the selected object for the selected users,
roles, or PUBLIC user rights. The Revokable Privileges list displays only the privileges that
the log-on user can revoke.
The Revoke tab contains the following elements:
Element Description
Revokable Privileges Allows the user who is logged on to revoke.
To be Revoked Privileges that you have selected to be revoked.
Options Filters the list by privilege type. For example, to select all ACCESS
privileges, select the ACCESS check box. The exact privileges selected
depend on the database object type.
Element Description
With Grant - [Optional] If selected, the WITH GRANT OPTION is
added to the REVOKE request in the generated SQL statement. If this
option is chosen, only the GRANT capability is removed, not the
privilege.
All Children - [Optional] If selected, the ALL option is added to the
REVOKE request in the generated SQL statement.
Revoke Revokes the privileges listed in the To be Revoked list.
The Grant, Revoke, or Display Column Rights dialog enables you to grant, revoke, and
display table and view column rights privileges for database users, roles, or user PUBLIC.
The dialog contains two tabs:
Tabs Description
Grant/Revoke Selects database, table or view columns, and objects for which to set column
rights.
SQL Preview Reviews generated SQL and select to save or edit.
Grant/Revoke Tab
Main Option Sub Option Description
On Columns Database Name Selects the database name to retrieve table or view object
names.
Table Selects to display the table list for the selected database
name.
View Selects to display view list for the selected database name
All Columns Selects all column names to set column rights privileges.
Next select either database User(s), Role(s) or Public and
click the View Details button to update the Grant/
Revoke/Display tabs.
SQL Preview
The SQL Preview tab previews the generated SQL that is 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 SQL statements 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 privileges for the selected database
object. Object details display only after you click View Details.
Grant Tab
The Grant tab shows the list of grantable privileges for the selected objects and lets you
specify which privileges to grant. You must click Grant to grant the privileges on the column
name objects you select. The Grant tab contains two lists:
List Type Description
Grantable Privileges Lists current grantable privileges on the selected column name object.
To be granted Lists the privileges you select to be granted.
You move privileges from the Grantable Privileges list to the To be granted list to indicate
which privileges to grant on the selected column name objects.
1 In Grantable Privileges, review and then select the privileges to grant on objects you
selected in the To 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 these options:
Option Description
With Grant Grants the WITH GRANT permission on the column name objects in the To be
granted list.
All Children Grants the privileges to the children of the selected parent objects.
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 column name objects listed in the
To be granted list.
Revoke Tab
The Revoke tab shows the list of available revocable privileges for the selected object(s) and
lets you specify which privileges to revoke from that object. You must click Revoke to revoke
the privileges on the column name objects you select. The Revoke tab contains two lists:
List Type Description
Revocable Privileges Lists current revocable privileges on the selected column name object.
To be revoked Lists the privileges you selected to be revoked for column name objects.
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 column name object.
1 In Revocable Privileges, review and then select the privileges to revoke on objects you
selected in the To Objects section of the dialog.
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 [Optional] Under Options select these options:
Option Description
With Grant Revokes the WITH GRANT privilege on the column name objects in the To be
revoked list. If selected, the WITH GRANT OPTION is added to the REVOKE
request in the generated SQL statement. If this option is chosen, only the GRANT
capability is removed, not the privilege.
All Children Revokes privileges for the children of the selected parent objects. If selected, the
ALL option is added to the REVOKE request in the generated SQL statement.
4 Click Revoke to revoke privileges on the column name objects 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 Column Rights dialog is
not closed.
The Connect Through Rights dialog enables you to grant, revoke, and display connect
through privileges on trusted database users in its two tabs.
Tab Description
Grant/Revoke Select the trusted database users for which to set connect through rights.
SQL Preview Review generated SQL and select to save or edit.
Grant/Revoke Tab
Tabs Description
Trusted User Select the database user that you want proxy users to connect through.
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.
Revoke Revoke connect through privileges to an application or permanent
proxy users.
Tabs Description
Display Display the current connect through privileges for 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.
2 In Roles, select up to 15 roles that the Trusted User can use when the DBS/Application
users connect through.
3 Click Add To to add the proxy user name and role to the Grantable Privileges list.
4 In Grantable Privileges, review and then select the privileges to grant.
Use the Shift and Ctrl keys to select multiple privileges.
5 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.
6 Preview the generated SQL statement in the SQL Preview tab, and if necessary, repeat
previous steps to modify SQL.
7 Click Grant to submit SQL and grant privileges listed in the To be Granted list.
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.
2 [Optional] Click the Grant/Revoke tab to change the granted or revoked privileges
defined in the SQL statement.
Any changes you make automatically generate new SQL for your review.
3 Click any displayed error links below the generated SQL and correct the errors.
Error messages link to the field that contains the error.
4 Choose one of the following:
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.
The dialog contains two tabs:
Tabs Description
Grant/Revoke Selects database users for which to grant or revoke log-on rights.
SQL Preview Reviews generated SQL and select to save or edit.
Grant/Revoke Tab
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.
Display Tab
The Display tab contains a Details tab that displays the current privileges for the selected
database object when you click View Details.
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.
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.
Move Space
The Move Space dialog 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.
Space To Move Shows the amount of space to move between the selected databases. The
number is in terms of the selected KB, MB, or GB button. You can change
the value in the Space to Move field by typing the value, clicking the up/
down arrows to the right of the value, or by adjusting the Portion of space to
move slider (see below).
KB, MB, GB Indicates whether the units of space are kilobytes (KB), megabytes (MB) or
gigabytes (GB).
Portion of space to Provides an alternate way to specify the amount of space to move. The
move 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 Space to Move
field.
Allocations Shows two bars that indicate the allocation of used and free space of the
(graphical) databases selected in From Database and To Database. From left to right,
the bars indicate the amount of space in the From Database that is currently
in use, the amount that is free, the amount of space in the To Database that
is free and how much is in use. The bar labeled "Original" shows the current
allocation of the space for the selected databases. The bar labeled "New"
Option Description
shows what the allocation of space is if you move the amount of space
specified in the Space to Move field. The "New" bar information is adjusted
as you specify values in the Space to Move field. The shades of the segments
of the bars correspond to the shades of the headings in the Allocations
(numeric) table below.
Allocations Displays a table that shows the allocation of used and free space of the
(numeric) selected databases. The values display in the units of the selected KB, MB, or
GB button. The row labeled "Original" shows the current allocation of the
space for the selected databases. The row labeled "New" shows what the
allocation of space is if you move the amount of space specified in the Space
to Move field.
Move Space Moves the space from the From Database to the To Database. This button is
enabled only when all the required dialog fields contain valid values.
The message area at the top of the dialog 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 needs to be done. When there is enough information specified to move
space, the message changes to an information icon, and the Move Space button is enabled.
The Access Logging Rules dialog enables you to begin or end access logging on specific
databases or users and view the access logging rules based on selected criteria.
Option Description
By User View rules grouped by users.
On Database View rules grouped by database.
On User View rules for a user.
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
All Users Creates an access logging rule that applies to all users on the database.
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.
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.
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.
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).
The Query Logging Rules dialog enables you to begin, end, and delete query logging for
Application(s), All Users or any Specific User(s) and view the query logging rules based on
selected criteria.
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.
Option Description
Modify Query Enabled when you select Specific User(s). Select the selected list items in
Logging 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.
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.
Option Description
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 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)
Elapsed (1/100) is the default.
CPU Time
CPU (Normalized)
I/O Count
Administer Roles
The Administer Roles dialog enables you to create or modify roles. You must have the
CREATE ROLE privilege to create a role.
1. In Role Name, type a new role name or select an existing role to modify from the list.
2. In Comment, type a brief description of the role.
3. If the role is an enterprise-wide role that is managed in a directory, select the External
Role check.
4. Click any of the Administrator Roles tabs and complete the information. This
information automatically generates an SQL DDL statement that you can preview and
run in the SQL Preview tab.
About Roles
Roles define privileges on database objects. Using roles, a database administrator (DBA) can
define unique roles for different job functions and responsibilities. They can also define a
single role that they may assign to multiple users with identical database access
requirements. Typically, users are members of more than one role.
Assigning a default role to a user gives that user access to all the objects for which the role
has access privileges. A default role that has been granted other roles provides a user to
which it is assigned additional access to all the objects on which the nested roles have
privileges. The privileges of a role granted to another role are inherited by every user
member of the grantee role.
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. Use the
Privileges Dialog to grant privileges to a role.
Task Required Privilege
To modify a user's default CREATE USER or DROP USER
role
To grant a role to a user WITH ADMIN OPTION privilege on the role
or other role
1 From the All Users list, select the users to assign to the role and move them to the User
Members list using the directional arrows.
The single arrow moves a single user; the double arrow moves multiple users.
2 Click the SQL Preview tab to view the generated SQL DDL statement.
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.
Run SQL Executes the SQL. This actions resets the Administer Roles dialog.
Show in Editor Displays the SQL statement in the SQL Editor. To edit the SQL, you
must close the Administer Roles dialog.
To create an Aster database, you must be a superuser or granted the db_admin privilege.
When you create a database, you are the owner of the database. No other users have the
rights to use it unless you grant them the privilege to use it. As the owner, only you have the
right to drop the 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 Grant users at minimum the CREATE privilege
database 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 right to create tables or objects in Revoke the CREATE rights on a database or
a database schema for the user.
7 Click SQL and review the generated DDL statement that includes your changes.
8 Click Commit to execute the new definition for the database.
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.
Also, granted membership is a way to group users together who require access privileges to
specific database objects. You can manage secure levels of access by granting specific
privileges for the group as a whole. We recommend you create the group role first, and then
add users to the role.
Object Viewer provides a Privileges tab for each Aster database object, role, and user where
you can grant privileges and membership in roles that define rights to objects.
User
Users are Aster database users. Databases on an Aster Database server share the
users and groups of users on the server. You can group users using roles and set
group privileges to auto inherit. You can also set up specific users to have roles which
grant them access to specific database objects. To grant a user the right to create
databases, users, and roles, grant the db_admin role. Grant a lower-privileged role
such as catalog_admin to deny the right to create databases, users, and roles.
Role
A role is a database role that an administrator creates or assigns. A role can own a
database or have specific privileges to access objects in the database. You can assign
roles to users or groups of users. Assigning roles to groups of users enables you to
manage user groups as roles. Roles can also have log-on and system access capability,
and like groups, include other roles as members. Roles that you create are valid for all
databases on an Aster Database server. A role with INHERIT automatically uses
database privileges granted to all roles that it is a member of.
Public
PUBLIC specifies that privileges are to be granted to all roles. Any single role has the
sum of privileges granted directly to it, plus privileges to any role of which it is
presently a member, and privileges granted to PUBLIC. Grant options cannot be
granted to PUBLIC. If your database administrator grants ALL privileges on schema
PUBLIC to users in the PUBLIC role (default install setting), then all users can by
default create databases in new databases, and tables within the PUBLIC schema in
the new database.
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.
Action Bar
The action bar in the upper right corner allows you to execute SQL to create the user
definition. You can also reset the User form and begin again, or cancel and close the
form. You must execute the generated SQL by clicking Commit to create the user
object before you can assign roles or privileges.
1 Click the Teradata Administrator tab or select Window > Teradata Administrator to
open the Teradata Administrator perspective.
2 In Data Source Explorer, click the Aster connection profile name for the Aster Database
in which you want to create a user.
The Object Viewer opens and displays the Users associated with the profile.
3 In the Object Viewer toolbar, click (Create a new Aster user).
4 Navigate to the Users object form which displays below the list of Users in the Object
Viewer main view.
5 Click General and type a name for the user.
c In Confirm Password, retype the password you entered in the previous step.
d Select the Inherit check box to enable this user to automatically inherit group
privileges.
6 Review the generated SQL and click Commit to create the user.
After you create the user, you can continue to specify additional properties such as roles
for the user and object privileges.
7 Click In Roles and specify roles for this user.
9 Click SQL.
h [Optional] With Table selected as the Object Type, select first the name of the Aster
Database and next the Schema which contains the object for which you want to
modify object privileges.
i [Optional] Double-click the privilege selection boxes to the right of the Table object
name to assign SELECT, SELECT w/Grant, UPDATE, UPDATE w/Grant, DELETE,
and/or DELETE w/Grant privileges for the object.
j [Optional] With View selected as the Object Type, select first the name of the Aster
Database and next the Schema which contains the View object for which you want to
modify object privileges.
k [Optional] Double-click the privilege selection boxes to the right of the View object
name to assign SELECT, or SELECT w/Grant privileges for the object.
l [Optional] With Function selected as the Object Type, select first the name of the
Aster Database and then the Schema which contains the Map Reduce Function
object you want to modify.
m [Optional] Double-click the privilege selection boxes to the right of the Function
object name to assign the EXECUTE privilege for the object.
7 Click SQL and review the generated DDL statement that executes your changes on the
User object definition.
8 Click Commit to execute the DDL for the User object.
Aster Database manages database access using roles. An Aster Database administrator
creates roles and assigns them to either a database user or to a group of database users.
Depending on how you set up roles, roles can own database objects and assign privileges to
other roles. The assignment of roles controls which users have access to which objects.
An administrator can grant membership in a role to another role. Membership enables a role
to use the privileges granted to the role in which it is a member. Administrators also can use
roles to create groups of users. Groups of users are identified by the roles assigned to them
and any rights they have, inherited or not, to access specific database objects.
Role Form
Use the Role form to specify a role definition that can be used to create a new Aster role or
modify the roles and privileges of an existing one.
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.
Action Bar
The action bar in the upper right corner allows you to execute the SQL to create the
role, reset the form, or cancel and close the form. Be sure to commit your DDL role
definition to create a new role or to save your changes to an existing role in the Aster
Database.
5 Navigate to the Roles object form which displays below the list of Roles in the Object
Viewer main pane.
6 Click General.
b Select the Inherit check box to specify this role inherits the privileges of roles of which
it is a member.
c Select the Role can create database check box to give the role the rights to create a
database object.
d Select the Role can create role check box to give the role rights to create a role.
7 Review the generated SQL and click Commit to create the role.
After you create the role, you can continue to specify role properties such as role
membership and rights to specific database objects.
8 Click In Roles and specify to which roles the new role will be added as a new member
with IN ROLE or IN ROLE w/Admin privileges.
Roles Description
In Role Role is a member in the role.
Not in Role Role is not a member in the role.
Add to Role Role selected to be added as a member to the role.
Remove from Role Role selected to be removed as a member of the role.
12 Click SQL.
1 Click the Teradata Administrator tab or select Window > Teradata Administrator to
open the Teradata Administrator perspective.
2 In Data Source Explorer, select the Aster connection profile in which you want to
change privileges on roles.
The Object Viewer opens.
3 Click the Roles tab.
4 Select the role on which you want to change privileges and/or role membership.
The Role object form opens and displays the name of the role you selected.
5 [Optional] Click In Roles and specify the IN ROLE or IN ROLE w/Admin privileges for
the selected role.
Roles Description
In Role Role is a member in the role.
Not in Role Role is not a member in the role.
Add to Role Role selected to be added as a member to the role.
Remove from Role Role selected to be removed as a member of the role.
7 For each user or role to be added as a member of this role, specify the MEMBER and/or
MEMBER w/Admin privileges.
Members of a role can use the privileges of the group role.
9 Click SQL.
1 In Data Source Explorer, click the Aster Database connection profile that contains the
role you want to drop.
The Object Viewer displays the Databases, Users, and Roles for the selected Aster
Database.
2 Click the Roles tab and in the Role Name column select the role you want to drop.
You can select multiple roles to drop at one time.
3 In the Object Viewer toolbar, click (Drop the selected object).
4 When prompted to confirm the drop, click OK.
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. It will then
expand and select that object in the Data Source Explorer. If the Object Viewer is open, the
object also displays in the Object Viewer window. Find Object uses the Teradata
Dependency Browser to perform the search for the specific object type.
Note: The search is not case sensitive.
Find Next
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.
Option Description
Reset Resets the Search Value to an empty field and the Object Type for
the selected location in the Data Source Explorer.
The Advanced Find Object ( ) feature enables you to find all database objects that match a
certain text pattern. It searches the referenced Connection Profile for objects names that
match the text pattern. The Advanced Find Objects feature uses the Teradata Dependency
Browser to perform the search for each object type selected in the dialog.
Option Description
List of Databases or If you opened Advanced Find Objects dialog from the Databases
Connection Profiles available Folder, a list of databases for the given Connection Profile appears.
for the search If you opened the 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.
Types of search constraint are as follows:
Option Description
Within each object type category, it is further grouped by sub-element, such as:
Columns
Constraints
Triggers for Tables
Parameters for Macros and Stored Procedures
Columns for Views
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.
You can also open an object for closer viewing in the Object Viewer. Double-clicking an
object opens the object in its own Object Viewer tab. This option is enabled on all entries in
the Find Result table, including columns, constraints, and parameters.
You can generate data definitions for a database and their objects using the Generate DDL
wizard available in the Teradata Administrator perspective. The generated SQL Data
Definition Language (DDL) scripts you create can then be executed to define the structure of
a database, including tables and triggers, functions, and views.
The DDL is generated and saved in an Eclipse project. You have the option to then execute
the DDL script directly on a specified connection profile from an SQL Editor. You can use
this .sql file to create the same database object in a different database, or you can generate the
DDL for a complete database to create a new database on a different server. You can also
open the .sql file in an SQL Editor instance and edit it to make changes.
The ability to generate DDL scripts for database objects and execute it from an SQL Editor is
supported for Teradata Database and Teradata Aster Database 6.10.
Data definition language (DDL) defines the structure of a database, including rows, columns,
tables, indexes, and more. You can generate data definition language (DDL) for a database,
database objects, or both using the Generate DDL wizard. The DDL is generated into a .sql
file in an Eclipse project, or is executed directly on the specified Connection Profile. You can
use this .sql file to create the same database object in a different database, or you can generate
the DDL of a complete database to create a new database on a different server. You can edit
the .sql file if you want to make changes.
1 In the Data Source Explorer, right-click a database, table, user-defined function, user-
defined datatype, or a database view.
2 Select the model elements to include in the DDL script and click Next.
Option Description
DROP statements Generates SQL drop statements. DROP statements remove an existing
object from the database.
CREATE statements Generates SQL CREATE statements.
Comments Generates COMMENT statements.
3 Select the model objects to include in the DDL script and click Next.
The object type determines which model object options are available.
Option Description
Functions User-defined function
Hash/Join Indexes Database, table
Macros Database
Databases Database
Stored Procedures Stored procedure
Tables Database, table
Triggers Database, table
User-Defined Types User-defined datatype
Views database, view
Option Description
Folder Name Project folder name. You can click Browse to select a folder.
File Name File name
Preview DDL Previews the generated DDL.
Open DDL File for Editing Opens SQL file in the SQL Editor.
5 Click Finish.
4 When a message displays and asks if you want to switch to the Query Development
perspective, click Yes.
The DDL text displays in an SQL Editor.
The Generate DDL wizard enables you to generate the data definition for Teradata databases
and their objects. The Generate DDL feature is only available in the Teradata Administrator
perspective. You can execute the DDL script from the SQL Editor.
1 Open the Teradata Administrator perspective by clicking the Teradata Administrator
tab in the perspective bar.
2 In the Data Source Explorer, expand a Teradata database node.
3 Right-click a database, table, user-defined function (UDF), user-defined datatype (UDT),
or view object and select Teradata > Generate DDL....
The Objects dialog of the Generate DDL wizard opens.
4 Select which statements to include in the DDL script by selecting one or more of the
following check boxes:
Option Description
DROP statements Generates SQL DROP statement in a DDL script. DROP statements
remove a definition from the data dictionary.
CREATE Generates SQL CREATE statement in a DDL script. CREATE statements
statements create or replace a definition.
Comments Generates COMMENT statement in a DDL script. COMMENT statements
create a user-defined description of an object or definition in the data
dictionary.
5 [Optional] Click action buttons to quickly select which objects to include in the script.
Select All Selects DROP and CREATE statements and Comments.
Deselect All Selects no check boxes.
Restore Defaults Selects only CREATE statement and Comments as the defaults.
6 Click Next.
7 Select the object definitions to include in the DDL script.
The object definitions you are able to generate depend on the type of database object you
selected in Data Source Explorer.
8 [Optional] Click action buttons to quickly select which objects to include in the script.
Select All Selects all the objects.
Deselect All Selects no objects.
Restore Defaults Selects all objects as the default.
9 Click Next.
Based on your selections, the wizard generates the DDL and displays the resulting script
in the Save DDL dialog.
10 In Folder, specify the path to the folder where you want the generated DDL script saved.
The default is the SQL folder displayed in the Project Explorer. Click Browse to specify
a different folder.
11 Type the File Name for the file in which the script is saved.
12 Review the generated DDL script in the Preview DDL section.
13 [Optional] Select the Open DDL file for Editing check box to open this SQL file in an
SQL Editor when you click Finish.
14 Click Next.
15 Review the Summary of selections you made in previous steps.
If you want to change a setting, click Back to return to a previous dialog and make your
change.
16 Click Finish.
17 [Optional] If you selected the Open DDL File for Editingoption, and you are not
working in the Query Development perspective, click Yes to switch to the Query
Development perspective.
The generated DDL script displays in a SQL Editor instance where you can edit it.
The Aster Generate DDL wizard enables you to generate the data definition for Aster
schemas and their objects. This feature requires Aster Database 6.10 or later.
1 Clicking Teradata Administrator in the perspective bar.
2 In the Data Source Explorer, expand an Aster database node.
Option Description
DROP statements Generates SQL DROP statement in the DDL script. DROP statements
remove a definition from the data dictionary.
CREATE statements Generates SQL CREATE statement in a DDL script. CREATE statements
create or replace a definition.
8 Click Next.
The resulting script displays in the Save DDL dialog.
9 In Folder, specify the path to the folder where you want the generated DDL script saved.
10 In File Name, type the name of the file in which to save the script.
11 Review the generated DDL script in the Preview DDL section.
12 [Optional] Select Open DDL file for Editing to open this SQL file in an SQL Editor.
13 Click Next.
The Summary of selections you made in previous steps displays.
14 Click Finish.
15 [Optional] If you selected the Open DDL File for Editing option, and you are not
working in the Query Development perspective, click Yes to switch to the Query
Development perspective.
The generated DDL script displays in a SQL Editor instance where you can edit it.
Create Database
The Create Database dialog enables you to define a new database and to run the generated
SQL DDL statement to create that database. You can also save the generated SQL to a file for
future editing or execution.
Element Description
Parent Database Name Parent database in which the new database is created.
New Database Name Name of the new database.
Definition Description of the new database.
SQL Preview Displays the generated SQL DDL statement for the new database
and execute the SQL to create it. You can also choose to save the SQL
to a file.
Reset Clears the dialog in preparation to define a new database.
Modify Database
The Modify Database dialog enables you to change the definition of an existing database,
including journal tables, and run the generated SQL DDL statements to modify the database
or save the generated SQL DDL to a file.
The dialog contains the following elements:
Element Description
Parent Database Name Displays the name of the owning database
Database Name Displays the name of the database you are modifying
Definition Displays the database definition information. You can
edit this information.
ModifyJournal Displays the journal table information. You can
modify this information.
SQL Preview Review the SQL generated for the new database you
have specified. You can run the SQL to create the
database or save the generated SQL to a file.
Reset Clears fields in preparation to define a new database.
The Create User wizard enables you to define a new Teradata user and either run the
generated SQL DDL statements to create the user object in the database or save the
generated DDL to a file.
Options Description
User Definition information to describe the new user such as the
user name.
Database Definition information concerning database properties such
as permanent space size.
Session Definition information concerning the user session such as
the default character set.
Comment Comment string for this user definition.
SQL Review of the SQL DDL statements generated for the new
user you specified and run the SQL to create the user or save
the generated SQL to a file.
Reset Clear dialog fields before you define a new user.
Modify User
Use the Modify User dialog to change the attributes of a user definition.
The dialog contains the following tabs:
Tab Description
User Information Modifies information about the user such as the user's account.
Database Information Modifies information such as permanent space size.
Session Information Modifies information such as default character set.
Password Information Modifies the user password.
Comment Sets the comment for this user.
SQL Preview Reviews the SQL generated for the user you modified and run the
SQL to modify the user, save the generated SQL to a file, or save the
CREATE USER DDL statements to the SQL Editor.
Reset Clears the dialog fields back to original values.
Clone User
The Clone User dialog enables you to create a new user from an existing user definition. The
dialog populates the new user attributes with the user values of the existing definition. You
can then modify or accept the values as you choose. Attributes such as the user name and
password are required fields.
The Clone User dialog is divided into the following six tabs:
Tab Description
User Information Information about the user such as the user's account and default role.
Tab Description
Database Database information such as permanent and temporary disk space
size.
Password User password.
Session Session information such as default date form and default character set.
Comment Comments.
SQL Preview Views the SQL generated for the cloned user definition. Specify whether
you want to run the SQL to create the user, save the generated SQL to a
file, or save the create user DDL statements to the SQL Editor.
Complete the information requested on each tab and then go to the SQL Preview tab to:
View the generated SQL for the CREATE USER statement
Show the CREATE USER statement in an Editor for editing
Run the SQL to create a new user
Save the SQL in a file
You can click Reset at any time to return all fields to their original values.
Create Table
The Create Table dialog enables you to create database tables and run generated SQL DDL
statements to create the table. Also, you can save the generated SQL to a file for future
editing or execution.
Option Description
Database Name Database in which to create the table.
Table Name Name of the table.
Temporary Table Sets the table to be temporary. If you do not select the box, the table
continues to be persistent.
Columns Defines the columns that make up the table.
Primary Key Specifies the Primary Key of the table.
Indexes Specifies the indexes of the table.
Foreign Keys Specifies Foreign Key references to other tables.
Summary Displays a summary of the columns in the table.
SQL Preview Views the SQL generated for the table and run the SQL to create the
table. Also you can save the generated SQL to a file.
Reset Clears the dialog fields in preparation to create a new table.
Create View
The Create View dialog defines views of database tables. You can execute the generated SQL
DDL statements to create the view or save the generated SQL to a file.
Option Description
View Name Specifies the name of the view to create.
Table and Columns Selects the table on which the view is based and the
columns to include in the view.
Options Specifies additional options for the view.
SQL Preview Reviews the SQL generated for the view you specified
and run the SQL to create the view. You can also save
the generated SQL to a file.
Reset Clears the dialog fields before you define a new view.
Create/Modify View
The Create/Modify View dialog enables you to define views and execute the generated SQL
DDL to create the view or save it to a file.
Option Description
Database Name Specifies the database in which you want the view created.
When modifying an existing view, the database of the
current view is selected by default.
View Name Specifies the name of the view to create. When modifying
an existing view, by default the name is set to the name of
the view being modified.
View Name Indicates whether to define a RECURSIVE view.
Query SQL Specifies the query statement that determines the
contents of the view.
Options Specifies additional options for the view. You can specify
optional column names and locking clauses.
SQL Preview Displays SQL generated for the view and optionally
executes the SQL to create or update the view or saves the
generated SQL to a file.
Reset Returns settings to the original definition of the view
(when modifying an existing view) or clears the dialog
fields (when creating a new view).
Create Trigger
The Create Trigger dialog enables you to define the triggers of database tables. You can
specify the actions of the trigger and run the generated SQL DDL statement to create the
trigger. You can also choose to save the generated SQL to a file.
Options Description
Trigger Database Name Select the name of the database to hold the new trigger.
Options Description
Trigger Name Specify the name of the trigger.
Trigger Specification Specify when the trigger is activated and how to refer to table values
before and/or after changes occur.
Action Statements Specify the statement to run when the trigger is activated and the
conditions that determine if the trigger is activated.
SQL Preview Review the SQL generated for the trigger. You can run the SQL
statement to create the trigger or save the generated SQL to a file.
Reset Click Reset to clear the dialog fields in preparation for defining a
new trigger.
Create Macro
The Create Macro dialog enables you to define database macros and run the generated SQL
DDL statements to create the macro. You can also save the generated SQL to a file.
Option Description
Database Name Lists available databases. Select the database in
which to create the macro.
Macro Name Specifies the name of the macro.
Parameters Defines the parameters that make up the macro.
Macro Body Specifies the AS Clause of the macro.
Parameter Summary Displays a summary of the parameters in the
macro.
SQL Preview Displays the SQL generated for the macro you
specified. You can review the SQL statement and
then run the SQL to create the macro or save the
generated SQL to a file.
Reset Clears the dialog fields before you define a new
macro.
The Create Stored Procedure dialog enables you to define SQL stored procedures and run
the generated SQL statements to create the stored procedure, or save it to an SQL file to
modify and run later. It does not support creating External Stored Procedures.
Option Description
Database Name Specifies the database in which to create the
stored procedure.
Option Description
Stored Procedure Name Specifies the name of the stored procedure to
create.
Dynamic Result Sets Specifies the number of dynamic result sets
returned by the Stored Procedure (*Teradata 12.0
and higher feature).
Parameters Defines the IN, OUT, and INOUT parameters
that make up the stored procedure.
Stored Procedure Body Specifies the body of the stored procedure.
Parameter Summary Displays a summary of the parameters in the
stored procedure.
SQL Preview Displays the SQL that is generated for the stored
procedure you specified. You can execute the
SQL statements to create the stored procedure or
save to an SQL file.
Reset Clears the dialog before you define a new stored
procedure.
The Create User-Defined Function dialog enables you to define database user-defined
functions (UDF). You can then run the generated SQL DDL statements to create the user-
defined function or save the generated SQL to a file to possibly modify and run later.
Option Description
Database Name Specifies the database in which to create the user-
defined function.
User-Defined Function Name Specifies the name of the user-defined function to
create.
Parameters Defines the parameters that make up the user-defined
function.
Return Type Defines the return type for the user-defined function.
User-Defined Function Body Specifies the AS Clause of the user-defined function.
Parameter Summary Displays a summary of the parameters in the user-
defined function.
SQL Preview Displays the SQL generated for the user-defined
function you specified and then runs the SQL to create
the user-defined function or saves the generated SQL to
a file.
Reset Clears dialog fields before you define a new user-
defined function.
The Create Structured User-Defined Type dialog defines the database user-defined type
and runs the generated SQL DDL statements to create the user-defined type. You can also
save the generated SQL DDL to a file to modify and run later.
Element Description
Database Name Select the database in which to create the user-define type. In
this case, it is always SYSTUDTLIB.
Type Name Specify the name of the user-defined type to create.
Attributes Define the attributes that make up the user-defined type.
Edit Edit the user-defined type SQL DDL statement to create.
Attribute Summary Displays a summary of the attributes in the user-defined
type.
SQL Preview Review the SQL DDL statements generated for the user-
defined type you specified. You can execute the SQL to create
the user-defined type or save the generated SQL to a file.
Reset Click Reset to clear the dialog fields before you define a new
user-defined type.
The Create Distinct User-Defined Type dialog defines a database user-defined type and
runs the generated SQL DDL statements to create the user-defined type. You can also save
the generated SQL to a file to modify and run later.
Option Description
Database Name Select the database in which to create the user-define type. In this case, it
is always SYSTUDTLIB.
Type Name Specify the name of the user-defined type to create.
Define type Define the type for the user-defined type.
Edit Edit the user-defined type DDL to be created.
Type Summary Displays a summary of the type used by the user-defined type.
SQL Preview Review the SQL generated for the user-defined type you specify and run
the SQL to create the user-defined type. You can also save the generated
SQL to a file.
Reset Click Reset to clear the dialog fields before you define a new user-defined
type.
The Create Array User-Defined Type dialog defines the database user-defined type and runs
the generated SQL DDL statements to create the user-defined type. You can also save the
generated SQL to a file.
The dialog contains the following elements:
Element Description
Database Name The name of the database in which to create the user-define type. In this
case, it is always SYSTUDTLIB.
Type Name Name of the user-defined type to create.
Define type Type for the user-defined type.
Type Summary Summary of the type used by the user-defined type.
SQL Preview Review of the SQL generated for the user-defined type you specified. You
can execute the SQL to create the user-defined type or save the generated
SQL to a file.
Reset Clears the dialog fields before you define a new user-defined type.
The Edit Comments dialog allows the user to edit the comments for a selected Teradata
Database Object.
Comments text field - Allows user to edit comments.
Update button - Updates the selected database object comments.
Cancel button - Cancel the edit comments request.
Drop Confirmation
The Drop Confirmation dialog prompts the user to confirm dropping the object selected. It
also allows you to answer Yes to all of the objects in the selected list, thus bypassing the
confirmation dialog for each object in the list. It provides a button to cancel the request. The
following buttons are provided:
Button Description
Yes Drops the current object.
Yes to All Drops all objects in the selected list. The confirmation dialog is not
presented for each object in the list.
No Does not drop the current object.
Cancel Cancels the drop request.
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 y the MDS password
Test User Tests the user credentials. A list of available database systems is
displayed in a dialog box.
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:
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 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).
The following actions appear in context menus of relationship lines:
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.
An Aster database contains one or more named schemas. Schema objects in turn contain one
or more other database objects such as tables, indexes, views, and Map-Reduce functions.
When you connect to an Aster Database, the structure of the database displays in the Data
Source Explorer. To expand the structure, click the arrow beside an object name. For
example, to view schema objects, click the arrow to the left of Schemas. This expands the
Schema folder to show a list of the objects in the schema. At the same time, the Object
Viewer displays a detailed list of the objects in the schema and gives you the capability to set
the properties for any object you select.
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.
Action Bar
The action bar in the upper right corner allows you to:
Commit Executes the SQL to create the database.
Reset Clears all values entered in the form.
You must click Commit to create the database before you can assign privileges in
the Privileges tab.
6 In Encoding, select the character set encoding to use for the new database.
The only valid value is UTF8 a variable-length character encoding for Unicode.
7 Click SQL.
a Review the generated DDL statements that will create the new database.
10 Click SQL to review the generated DDL with added GRANT and/or REVOKE
statements.
11 Click Commit to set the privileges you selected for this database.
Note: You can change any privilege you've set by returning to the Privileges tab and
double-clicking a privilege icon. Clicking the icon toggles it to the opposite privilege, for
example, from granted to revoked, revoked to granted, not-granted to granted, and so
forth. Use the legend above the table to make sure you've set the privilege correctly.
Clicking Commit executes and saves your changes.
The Schema object form displays below the Object Viewer view.
3 Click General and type a Name for the new schema.
4 Click SQL.
a Review the generated DDL statements that will create the new schema.
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 DDL, 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.
Action Bar
The action bar in the upper right corner allows you to execute SQL to create or
modify the schema definition. You can also reset the Schema form and begin again,
or cancel and close the form. You must execute the generated SQL by clicking
Commit to create the schema object before you can assign privileges.
1 Click the Teradata Administrator tab or select Window > Teradata Administrator to
open the Teradata Administrator perspective.
2 In Data Source Explorer, click the Aster connection profile name for the Aster Database
in which you want to create a user.
The Object Viewer opens and displays the Users associated with the profile.
3 In the Object Viewer toolbar, click (Create a new Aster user).
4 Navigate to the Users object form which displays below the list of Users in the Object
Viewer main view.
5 Click General and type a name for the user.
c In Confirm Password, retype the password you entered in the previous step.
d Select the Inherit check box to enable this user to automatically inherit group
privileges.
6 Review the generated SQL and click Commit to create the user.
After you create the user, you can continue to specify additional properties such as roles
for the user and object privileges.
7 Click In Roles and specify roles for this user.
9 Click SQL.
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.
Action Bar
The action bar in the upper right corner allows you to execute SQL to create the user
definition. You can also reset the User form and begin again, or cancel and close the
form. You must execute the generated SQL by clicking Commit to create the user
object before you can assign roles or privileges.
b Select the Inherit check box to specify this role inherits the privileges of roles of which
it is a member.
c Select the Role can create database check box to give the role the rights to create a
database object.
d Select the Role can create role check box to give the role rights to create a role.
7 Review the generated SQL and click Commit to create the role.
After you create the role, you can continue to specify role properties such as role
membership and rights to specific database objects.
8 Click In Roles and specify to which roles the new role will be added as a new member
with IN ROLE or IN ROLE w/Admin privileges.
Roles Description
In Role Role is a member in the role.
Not in Role Role is not a member in the role.
Add to Role Role selected to be added as a member to the role.
Remove from Role Role selected to be removed as a member of the role.
12 Click SQL.
Role Form
Use the Role form to specify a role definition that can be used to create a new Aster role or
modify the roles and privileges of an existing one.
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.
Action Bar
The action bar in the upper right corner allows you to execute the SQL to create the
role, reset the form, or cancel and close the form. Be sure to commit your DDL role
definition to create a new role or to save your changes to an existing role in the Aster
Database.
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.
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.
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.
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 Distributed by field,
select the column you want to be the key distribution column from the list.
6 Click Columns and for each column you add to the table, complete the following
information:
a Type the name of the new column in the Column Name field.
b Select the Data Type to use for the column from the list.
c In the Length field, 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 the Null checkbox if data values in this column can be null.
g Select the Unique checkbox if data values in this column must be unique.
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.
11 [Optional] Click Constraints and for each constraint you Add, complete the following
information:
a Type a name for the constraint in the Constraint Name.
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 the Storage by Row check box if you want the table data stored by the table row.
If you do not select the check box, data storage is by column.
c In Compress select the level of compression for an existing partition: HIGH,
MEDIUM, or LOW.
The default is HIGH.
d In Inherits, accept the default value "inherits" or type a different value.
Inherits indicates whether or not the table has an inheritance relationship with a
parent table.
e In Partition By, use the PARTITION BY RANGE or PARTITION BY LIST clause to
define child partitions and to specify which partition each row belongs to.
The PARTITION BY clause creates the table as logically partitioned in separate files,
and defines the layout of the partition.
13 Review the generated SQL and click Commit to create the table in the schema.
You must create the table before you can assign table privileges.
14 Click Privileges and from the Grantee Type list select one of the following:
Users
Roles
PUBLIC
a With Grantee Type selected as Users select a user to whom you want to grant rights
to this table.
b Double-click the selection boxes to the right of the user's name to assign the SELECT,
SELECT w/Grant, INSERT, INSERT w/Grant, UPDATE, UPDATE w/Grant, and/or
DELETE, DELETE w/Grant privileges.
c With Grantee Type selected as Roles select a role to which you want to grant rights
to this database.
d Double-click the selection boxes to the right of the role's name to assign the SELECT,
SELECT w/Grant, INSERT, INSERT w/Grant, UPDATE, UPDATE w/Grant, and/or
DELETE, DELETE w/Grant privileges.
e With Grantee Type selected as PUBLIC click public to grant the public role to this
database.
f Double-click the selection boxes to the right of public to assign the SELECT, INSERT,
UPDATE, and/or DELETE privileges.
Note: Privileges you grant are shown as Grants. After you click COMMIT and
return to the Privileges tab, privileges change to Granted.
15 Click SQL and review the generated DDL statement.
To modify the CREATE TABLE statement, return to previous steps to change your
selections. You can also copy and paste the DDL text into an SQL Editor to make edits.
16 Click Commit to execute the DDL statement and update the table definition on the
Aster Database server.
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.
Indexes Specify the indexes for a new table.
Contraints Specify constraints for the table.
Storage Specify how you want data distributed in the table. If this is a Fact
table, you must select a column to use as the key distribution column in the
Distributed by field.
Privileges Specify the privileges granted to this table for specific users and
roles in the Aster Database. You can also specify PUBLIC privileges for the table
object.
SQL Review the CREATE TABLE statement generated based on your
selections and field entries. The generated DDL statement creates the table or
modifies selected table privileges.
Action Bar
The action bar in the upper right corner allows you to execute SQL to create or
modify the table definition. You can also reset the Table form and begin again, or
cancel and close the form. You must execute the generated SQL by clicking Commit
and create the table before you can assign privileges.
Select the Tables folder and in the Object Viewer, select the table you want to drop
and click (Drop the selected object).
3 When you are prompted to confirm the table drop, click OK.
1 Click the Teradata Administrator tab or select Window > Teradata Administrator to
open the Teradata Administrator perspective.
a Specify one or more source tables in the SELECT " FROM clause.
You may enter the table name manually or right-click in the pane below the Query
editor pane to use the Add Table dialog.
b Select the DISTINCT check box to remove all duplicate rows from the result set.
The first row is retained for each set of rows that are duplicates.
c Review the summary information for the tables you include in the view.
Summary information includes Columns, Conditions, Groups, and Group
Conditions.
5 Review the generated SQL and click Commit to create the view.
After you create the view, you can continue to specify additional properties such as
privileges.
6 Click Privileges in the left panel.
8 Click SQL and review the generated DDL statement used to create the new view.
To modify the CREATE VIEW statement, return to previous steps to change your
selections.
9 Click Commit to execute the DDL statement and create the view in the Aster Database.
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.
Action Bar
The action bar in the upper right corner allows you to execute SQL to create or
modify the view definition. You can also reset the View form and begin again, or
cancel and close the form. You must execute the generated SQL by clicking Commit
to create the view object before you can assign privileges.
1 Select Window > Show View > Data Lab View to open the Data Lab View.
The Data Lab View enables you to access tables as child data labs in a data lab group.
Copying a Teradata table to a data lab is as easy as dragging the source table from the Data
Source Explorer and dropping it into the Data Lab View. The Data Lab Copy Wizard
guides you through the steps of performing a table copy.
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.
7 In Filter Table specify which table columns to copy and then select a filter type and data
value to filter the data in the column.
This filter creates the SELECT statement for the COPY operation.
8 Click Next.
9 In SQL Preview Filter Table, review the generated SQL for the COPY operation.
10 Click Finish.
11 Monitor the progress of the COPY operation in the Transfer Progress View.
The Data Lab View supports drag and drop of table objects from Data Source Explorer.
When you drop a table into the Data Lab View, the Data Lab Copy Wizard opens.
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 consists of several screen interfaces:
Interface 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.
When you drag and drop a table from the Data Source Explorer to the Data Lab View, the
Copy Wizard displays the name of the source and destination tables in the Copy Table
screen.
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.
The Copy Wizard enables you to review the source table columns and specify which columns
and data you want copied to the Data Lab destination table.
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.
The generated Data Definition Language (DDL) script that copies the source object to its
destination displays in the Generated SQL text area.
Query Development
The SQL Editor preferences customize the behaviors and look-and-feel of the SQL Editor.
To set preferences for general editor appearance and behaviors, go to Window > Preferences
> Data Management > SQL Development > SQL Editor.
General Tab
You can specify the following general preference settings:
Syntax Validation
Validates the syntax of the SQL statement.
Option Description
Enable syntax validation Syntax validation automatically updates the structure of an
SQL statement in the Outline view and performs the syntax
validation as you edit. The SQL Parser parses the SQL
statement according to the grammar for the version of
Teradata or Aster specified in the Connection Profile.
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 when content validation. The message displays if the number of lines in
exceeds maximum number the SQL file exceeds the value entered in Maximum
of lines number of lines.
Show detailed annotation When selected enables the SQL Editor to display the list of
information possible correct syntax options when a syntax error occurs
in the SQL statement.
Typing Tab
Select check boxes to enable or disable typing aids that are available when editing in Smart
Insert mode. Click to select an option and display the SQL in the Preview text area.
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.
The SQL Editor provides an integrated environment for the development of SQL files that
enables you to develop SQL statements for execution. The editor enables you to validate SQL
syntax, save files to a project or export to system files, and execute all SQL in a file or execute
the SQL as individual statements. You must specify a Connection Profile before you can
execute an SQL query statement.
The SQL Editor displays when you open an SQL/DDL file or when you select the Query
Development Perspective. Double-clicking an SQL/DDL file in the Project Explorer opens
that file in the editor.
Execute
Displays a list of Execute options. You can select to Execute an Individual
Statement that you have selected, or to Execute All query statements in the editing
pane.
Save
Displays a list of Save options. You can select to Save to Project or Export to File
System.
New SQL Editor
Creates a new SQL Editor window displayed in a separate tab.
View Result Sets
Displays the associated result sets for the SQL query execution.
Content Assist
Provides aids for validating, debugging, and editing the SQL queries you develop in
the editor. You can use the Text Editors preference settings ( Window > Preferences
> General > Editors > Text Editors) to change the appearance of the SQL Editor,
including displayed tab widths, color options, line numbers, mouseovers, and more.
The SQL Editor toolbar enables Connection Profile selection and action buttons that help
you manage and execute SQL for Teradata databases.
Connection Profile
Use the following features to connect to a Teradata database using a Connection Profile.
Option Description
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.
Profile is connected.
Profile is disconnected.
Actions
Click toolbar icons to perform tasks. The active task displays. To select a different option, use
the selection list to the right of the active icon.
Icon Option Description
Execute SQL as Executes all SQL statements or selected statements one at a time,
individual displaying the result as a Teradata Group Execution in the SQL
statements Results view. This option allows you to execute SQL DDL
statements, which requires its own COMMIT between statements.
The group result includes an individual SQL Result for each
statement.
Execute SQL as one Executes the line in the SQL file designated by the current cursor
statement position.
Save to Project Saves the SQL file to a project.
Open a new SQL Opens a new SQL Editor. This action does not close the current
Editor editor, enabling you to work with multiple editors in tandem
Execute SQL
The SQL Editor provides various options to execute SQL statements within an SQL file. To
access the following options, right-click inside the SQL Editor text area.
Option Label Description
Execute as Individual Executes all statements or selected statements one at a
Statements time, displaying the result as a Teradata Group
Execution in the SQL Results view. This option allows
you to execute SQL DDL statements, which requires
its own COMMIT between statements. The group
result includes an individual SQL Result for each
statement.
Execute All Executes all SQL statements in the SQL File and
displays the result as a single entry in the SQL Results
view. Multiple result sets display in multiple Result
tabs.
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.
Run Configurations let you define operations that you can run from the Run menu and
Run toolbar button.
Running database objects - Several types of objects can be "run" in from the Data Source
Explorer. See the following section for details.
Macros - Displays the Configure Parameters dialog box where the procedure's
parameters are specified. The macro is executed with the specified parameters. The results
of the macro are shown in the Result tab(s) of the SQL Results view.
Triggers - Displays the Edit Configuration dialog box where the SQL statement that
performs the operations that causes the trigger to be run is specified. The specified SQL
statement is run and the results of the SQL operation are shown in the SQL Results view.
When SQL operations are performed using the Run menu item, a launch configuration
specifying the way the operation was run is created. See the Running SQL from Run Menu
and Toolbar topic for details of how to rerun, edit and remove the automatically created
launch configurations.
Run Configurations
Run configurations let you manage and run SQL statements that you want to run on a
regular basis. The Teradata Studio Run menu gives you the ability to specify and run your
frequently used SQL operations.
8. [Optional] Click the Common tab to set other attributes for the run configuration.
Option Description
Save as Specify where to save the run configuration:
Select Local file to make it available to this project only.
Select Shared file to save the file in your project. Specify the
folder to hold the run configuration by clicking Browse
button. A file with the run configuration name plus the
suffix ".launch" is created in the specified folder of your
project. The ".launch" file can be copied to other projects. All
launch configurations in your projects are included in the
list.
Display in favorites menu Check Run to have the configuration always shown in the Run
History list of the Run menu. (Several recently run launch
configurations also are shown in the Run History.)
Other fields Other fields in the Common tab do not apply to SQL launch
configurations. Setting them has no effect.
Run last
Selecting the Run item from the Run menu reruns the latest SQL operation that was run.
The Format SQL toolbar command formats the SQL statement in the SQL Editor. The
formatter uses the formatting options specified in the SQL Formatter Preferences. The SQL
Formatter Preferences are available from Window > Preferences > Teradata Datatools
Preferences in the main menu.
The Set Connection Info menu option changes the Connection Profile for an SQL Editor
file. You can select the database server type, connection profile name, and database name
from the drop down lists then click OK.
SQL templates for creating SQL statements in the SQL Editor are provided in three ways:
Generate SQL options SELECT, INSERT, UPDATE, and DELETE statement templates
for tables. These Generate SQL options are available from the Query Development
perspective when you right-click a table object in Data Source Explorer.
Content Assist templates In-context insertion of SQL statements in SQL Editor. To
invoke the SQL Templates, place your cursor at the point in the SQL text where you want
assistance and enter CNTL+SPACE.
Templates View for Aster analytical functions Aster-only view that displays a list of
function templates you can drag and drop into the SQL Editor.
Templates provided through the Content Assist mechanism help you create Data
Manipulation Language (DML) type SQL statements, such as DELETE, INSERT, SELECT,
and UPDATE. Template variables support tabbing from one variable to another. Template
variables are linked allowing you to change one occurrence of a variable, for example,
tablename1, and automatically change all occurrences of that same variable in the
template. The Content Assist selection list includes all available SQL templates for creating
SQL at the cursor insertion point in the text.
1 Click the Query Development tab to open the Query Development perspective.
2 Open the Data Source Explorer and navigate to the Teradata or Aster database table in
which you want to insert rows.
3 Right-click the table object and select one of these options: .
For Select
Teradata Database Teradata > Generate SQL > SELECT Statement
Aster Database Aster > Generate SQL > 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.
For Select
Teradata Database Teradata > Generate SQL > INSERT (Parameterized) Statement
Aster Database Aster > Generate SQL > INSERT (Parameterized) Statement
4 In the SQL Editor, review the generated INSERT statement and edit as needed.
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.
3 In the main toolbar, select Windows > Show View > Other
The Show View dialog opens.
4 Scroll up to General and select TemplatesView which is located at the bottom of the list.
The Templates View opens below the SQL Editor. You can drag and dock the view in
the left pane beside the Data Source Explorer to see the full list easily.
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.
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.
You can compare the Data Definition Language (DDL) text of two database objects of the
same type. You can compare Teradata Database objects with other Teradata objects of the
same type, and Aster objects with other Aster objects of the same type.
The wizard guides you through the selection of the object you want to compare. Depending
on the object type you selected in the Data Source Explorer, the wizard helps you to select
an object of the same type. For example, if you select a Table object in Data Source Explorer,
you are allowed to only choose a Table object to compare with it.
Optionally for Teradata objects you can choose to include any dependent objects in the DDL
comparison. For example, you can include Tables in a database comparison, and triggers in a
Table comparison.
When you click Finish the Compare Editor appears and displays the DDL text of the
referenced object and the compare-to object side-by-side. You can use toolbar functions to
view the DDL differences and changed elements. You can also edit the text but you cannot
move text from one editor window to the other.
6 Select additional objects you want to include in the comparison by checking the box
beside it.
If the database contains no other objects, such as tables or functions, to include in the
comparison, the Compare Objects screen is blank.
7 Click Finish.
Results of the object DDL text comparison display in the Compare View.
If you select a database that does not contain tables, the message "No Tables" displays
below the database list.
5 Select a table object from the Table list.
This object is called the compared to object.
6 Click Next to select additional objects to include in the comparison.
7 Select additional objects you want to include in the comparison by checking the box
beside it.
If the table does not contain other objects such as triggers, the Compare Objects screen
is blank.
8 Click Finish.
Results of the object DDL text comparison display in the Compare View.
The Compare Editor compares the Data Definition Language (DDL) text of two database
objects and shows the DDL for each object side-by-side in a split window. Any differences in
text or changed elements between the two objects are high-lighted in the editor. You can
browse the text or use the toolbar to review next/previous differences and next/previous
changed elements.
Types of objects you can compare are:
Database
User
Table
Stored Procedure
Macro
User-defined Function
View
The following is an example of a comparison of the DDL text of two compared databases in
the Compare Editor.
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.
The Compare SQL Object Wizard enables you to compare the Data Definition Language
(DDL) text in a database object with another object of the same type in a Teradata or Aster
Database to which you can connect. You can compare database, user, table, macro, stored
procedure, user-defined function, user-defined type, and view objects in Teradata Databases.
You can compare schemas, Map Reduce functions, tables, user-defined functions, and views
in Aster Databases. The wizard uses the Teradata DDL Generator to generate the DDL for
the selected options.
Use the Compare Objects screen to select the object to compare with the referenced object
you selected in Data Source Explorer.
display in the pane below. To compare the referenced object, select a different object in the
list to which you want the referenced object compared.
The Compare Objects results display in the Compare Editor.
Connection Profile
The Select Connection Profile field provides a list of the profiles which are currently
connected. If the Connection Profile you want is not listed, go to the Data Source
Explorer and right-click Database Connections to connect to the correct database.
List of Objects for Compare
The Database field shows the objects in the Connection Profile database you
selected. Navigate to the object you want to compare with the referenced object, and
select it.
Objects to Include
If there are dependent objects you want to include in the comparison, you can select
these objects in the second Compare Objects screen. If an object has no dependent
objects, the screen is blank.
Select or Deselect
When selecting additional objects to include, you can select objects one by one or use
the Select All and Deselect All buttons at the bottom of the screen to make your
selection.
Compare Results
When you are ready to perform the comparison and click Finish the results of the
comparison appear in the Compare Editor.
Related Topics
About the Compare Editor, on page 218
The Result Set Viewer provides an enhanced view of the result set, including options to hide
columns, filter on column values, find column values, copy data to the clipboard, format cell
data, and switch between grid and text view. The result set is displayed in its own view with
its own toolbar.
You can change preferences to customize the view by, for example, displaying alternating row
background colors, enabling or disabling row numbers, column headers, table grid lines, and
thousand separator on numeric columns. You can change the max display row count, as well
as the display null value and date format. Refer to Result Set Viewer Preferences for more
detailed information of the Result Set Viewer preferences.
The Single Result Set Toolbar contains:
Icon Option Description
Preferences Click to open the Result Set Viewer Preferences page.
Show SQL Click to open a dialog that displays the SQL statement.
Query
Set Focus to
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
Display text. The default is grid.
Format Click to open the platform specific Font dialog which enables
Selected Cells you to select the font, size, and color (on most platforms) of
the selected cells.
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 Query Click to open a dialog that displays the SQL statement.
Rename Result Tab Click to open a dialog that allows you to rename the result
tab.
Rename Group Result Select one of the group result tabs while in Tab display
Tab mode. Right- click the tab and select the Rename Group
Result tab menu option.
Text or Grid Display Click to switch the view of the result set data between grid
or text. The default is grid.
Sash or Tab Display Click to switch the display of the multiple result sets
between a tab 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.
Refresh Result Set List Click to re-display all of the removed result sets.
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 the result sets to an external file.
This option is enabled when you execute multiple SQL
statements in a single execution, using the following SQL
Show All Columns Click to show all columns. Previously hidden columns are
also shown.
Auto resize column Click to resize the column to fit the largest cell.
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.
Format Selected Cells Click to open the platform specific Font dialog which
enables you to select the font, size, and color (on most
platforms) of the selected cells.
Other Actions:
Option Description
Sort Column Left-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.
The Result Set Viewer Preferences dialog enables you to set display options for result-set
data.
You can set the following preferences:
Option Description
Alternating Row Colors Display alternate Result Set rows in color Displays the
Option result set with alternating row background colors. This option
can be enabled by selecting the box. You can select a different
background color by clicking on the 'color' button. This option
is disabled by default.
Option Description
Display alternate Result Set Select the check box to display color in alternate rows of the result
rows in color set. Click the color box to open the Color dialog and select a basic
color or define a custom color to use.
Grid Display Options Show Row Numbers Displays row numbers. This option is
enabled by default.
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 rather than Column Names
Displays the column titles (if available) rather than the column
names, in the column header area. This option is disabled by
default.
Note: 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.
Note: The query must be rerun in order for a change to this
option to take effect.
Display Null Value as Changes the value that is displayed
when the data is null. The default for this options is "null".
Format Options 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 1000 Separator in Numeric Columns Displays a
1000 separator in numeric columns. This option is disabled by
default.
Display Negative Numbers in Red Displays negative
numbers in red. This option is enabled by default.
Display Date Format Changes the date format. 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.
Copy Column Delimiter 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
Viewer Window Options Select the Reuse Result Set Viewer Window check box to cause the
Result Set Viewer to refresh the current window with new 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.
Action Buttons Restore Defaults Restores the default values for the options.
Apply Applies any option changes. This might cause a
refresh of the current result sets displayed in the Result Set
Viewer.
OK Applies option changes and closes the Preferences page.
This might cause a refresh of the current result sets displayed in
the Result Set Viewer.
b Right-click the color box, and select a color in the Color dialog.
c Click OK.
5 Under Grid Display Options, select the following options as appropriate:
Option Description
Show Row Numbers Select to show row numbers in the grid display. This option is enabled
by default.
Show Column Select to show column headers in the grid display. This option is
Headers enabled by default.
Show Table Grid Select to display lines between rows and columns in table grid display.
Lines This options is enabled by default.
(*) Display Column Select to display column titles (if available) instead of column names as
Titles rather than labels in column headers. This option is disabled by default.
Column Names
Note: You must rerun the query to effect any change you make.
(*) Max Display Row Specify the maximum number of rows to display. The default value is
Count 2000.
Note: You must be rerun the query to effect any change you make.
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.
Option Description
Long Text Type the number of characters allowed for the long text boundary size.
Boundary Size Default is 150 characters. If a data value length is longer than the long text
boundary size, only the first 20 characters display. You can view the entire
data value by double-clicking the value in the display grid. The value
displays in a new window.
Display 1000 Select to display a 1000 separator in numeric columns. This option is
Separator in disabled by default.
Numeric Columns
Display Negative Select to enable display of negative numbers in red. The options is enabled
Numbers in Red by default.
Display Date Specify the format to use to display the date in the result set. Default
Format format is yyyy-mm-dd. When you specify the format, you must use the
Java SimpleDateFormat notation to format the date.
7 Under Copy Column Delimiter, in the Delimiter Format field, select how you want
columns delimited when the Copy data option is used on the grid display.
Option Description
Comma Separated Uses commas as delimiters to separate column data (default).
Tab Separated Uses tabs as delimiters to separate column data.
User Defined Type the delimiter you want to use in the Delimiter Value field.
8 [Optional] Under Delimiter Value, select the following options as appropriate: you want
column headers delimited when the Copy data option is used on the grid display.
Option Description
Copy Include Column Specifies to include column headers as delimited values when the Copy
Headers data option is used on the grid display.
Copy Include Grid Specifies to include grid lines as delimited values when the Copy data
Lines option is used on the grid display.
9 [Optional] Under Viewer Window Options, select Reuse Result Set Viewer Window if
you want newly generated result sets to display in the currently open Viewer window. If
the check box is not selected, each new result set displays in a separate window in the
Result Set Viewer.
10 [Optional] To clear selections and restore default settings, click Restore Defaults.
11 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.
12 Click OK to apply your changes and close the Preferences dialog.
3 Select the foreground options you want for the selected cells.
4 Click OK.
The foreground changes you select are applied to the selected Result Set Viewer cells.
3 Select the background color you want for the selected cells.
4 Click OK.
The background color changes are applied to the selected Result Set Viewer cells.
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) Deselect 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
Editor the 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 theTeradata Export Wizard .
Option Description
(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.
Aster
The following Large Value Handling settings enable you to set size restrictions for creating
BLOBs and CLOBs in Aster tables
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.
Actions
Option Description
Success Sound Test Click to hear the sound you selected as the indicator of a
successful result.
Failure Sound Test Click to hear the sound you selected as the indicator of a
failed result.
Apply Click to apply your changes.
Restore Defaults Click to return settings to default values.
OK Click to save your preference settings.
a Select Qualify names for drag and drop in SQL Editor to qualify names when
objects are dragged from the Data Source Explorer and dropped in the SQL Editor.
Clear this check box if you do not want names qualified.
b Select Prompt for notes to be able to enter a note when you execute SQL.
The Note dialog lets you enter a text value that displays in the Teradata SQL History
view in the Note column.
c Under Results Handler, the Teradata Result Set Viewer is selected as the results
handler for processing SQL result sets.
There is only this one option.
5 Click the Teradata tab to set large value handling rules in Teradata 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 0 (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.
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
colummn size which when exceeded, the object is handled as a binary large object
(BLOB).
Note: A value of 0 (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.
The SQL History view provides an enhanced display of the history information. As you
execute SQL statements from the SQL Editor or run functions from the Data Source
Explorer, an entry is added to the SQL History list.
The history displays extensive information about each SQL execution. It includes execution
elapsed time, DBMS time, fetch time, database server, row count, parameter display for
macros and stored procedures, SQL statement, and SQL statement type.
The SQL History view displays the data in a grid format that lets you select rows or cells. It
provides options to copy cells or rows, sort columns, delete rows, edit the note or SQL for a
history entry, filter columns, search for result history data, format the display, and re-execute
SQL statements.
The SQL History uses an embedded Derby Database to manage the SQL History entries.
If you close the view and need to re-open it, go to Window > Show View > Other > SQL
History.
You can add notes manually by clicking on the Note column value. You can also choose to be
prompted to add notes when you execute the SQL. Set the Prompt for notes option using the
SQL Handling preferences.
You can sort columns in ascending and descending order with the exception of the
Parameters column. For single column sorting, left-click the mouse button. For multi-
column sorts, note the following:
Columns are movable and re-sizable. Many of the columns are grouped together under a
collapsible header.
Rows can be selected by clicking in the numbered row header.
Column order, collapsed columns, filter, sort, and formatting are preserved from session
to session.
If a filter is in effect, the result of a newly executed SQL statement is inserted as 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 Result column contains a summary of the executed SQL operation. To read the entire
contents in a column cell, hover the mouse pointer over the cell. Error results show as red
text in the resulting tool tip display. The following examples are samples of the Result
summary.
Example 1: In this example a single statement was executed successfully. Executed as
Single statement. >Elapsed time = 00:00:00.108 STATEMENT 1:
Select Statement completed. 26 rows returned.
Example 2: In this example the executed statement failed. This statement also has this
icon associated with it. Executed as Single statement. Failed [3807 :
42S02] Object 'bogus' does not exist. Elapsed time = 00:00:00.145
STATEMENT 1: Select Statement failed.
Example 3: In this example the executed statement was canceled. This statement also has
this icon associated with it. Executed as Single statement. Canceled.
Elapsed time = 00:00:00.000 STATEMENT 1: Select Statement
canceled.
Toolbar Actions
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.
The SQL History view provides information about SQL/DDL executions on one or more
databases in your system. As you execute SQL/DDL statements from the SQL Editor or run
functions from the Data Source Explorer, an entry is added to the SQL History list.
Toolbar
The SQL History toolbar contains actions and menus that help you manage the data
in the history data grid.
Perspective Tab
The SQL History view displays when you select the Query Development
Perspective. You also can open the view from the main menu by selecting Window >
Show View > SQL History.
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
The top row of the history grid contains the column headers for the categories of data
collected during each SQL/DDL execution.
SQL History Data Grid
The SQL History view uses a data grid format of rows and columns to display
information for each SQL/DDL execution. The grid displays each history entry in a
single data row. Column headers in the top row distinguish the types of data
collected during each execution.
The SQL History toolbar contains icons and menus to help you manage the SQL History
view and display of history records. Actions such as Delete Rows and Delete All History, in
addition to removing records from the view, delete the records in the SQL history database.
Actions
Click toolbar icons to perform tasks. You also can access actions from the menu drop-down
( ) at the right-end of the toolbar.
Option Icon Label Description
Delete Row Deletes selected rows from the view and SQL history
database.
Filter Opens the History Filter dialog to select criteria for
filtering data in the view.
Use the Minimize and Maximize icons at the far right to resize the SQL History view.
Use the Data Filter feature to set filter rules that reduce the number of rows loaded into the
Table Data Editor.
1 From the Table Data Editor, click Data Filter icon.
2 In Filter, select a filter operator from the list and type a valid value or character string.
For example, if values in Column2 are type VARCHAR, and you filter to display only rows
LIKE product2, the Table Data grid refreshes to show all rows with the value
product2 in the data string.
3 [Optional] If you want to clear all rules and set new filters, click Clear All.
4 Click OK to show filter results based on your filter rules.
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
Option Description
Exclude Unsuccessful Queries Check this box to exclude unsuccessful queries from being
entered in the History database.
History Rows
In Limit History View Rows, type the maximum number of rows allowed to display in the
Teradata SQL History view.
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.
Execution Plans
The execution plans are displayed side-by-side within the Object Viewer along with the
ability to gather and view Statistics pertaining to an execution plan.
The individual plans are displayed as they would appear in the Execution Plan View. The
table is arranged as a column for each graphic execution plan. Each plan can be scrolled up
or down by moving the scroll bar. The columns can be expanded by moving the sash dividing
the columns.
The name of the profile is in parenthesis within the Execution Plan List tab label.
Icon Title Description
Statistics Indicates that the execution plan contains statistics data.
Select Plan Select the check box to select an execution plan from the
list.
Clicking the Query ID or SQL File Name column headers sorts the table of column
information with respect to the information in that table column. Clicking the same column
header again reverses the order of the sort.
Select a step from each graphic plan and the step attributes are displayed for the selected
steps in a table format. The columns can be expanded by moving the sash dividing the
columns.
The display shows the list of tables on the left side and the statistical attributes and data on
the right side. When you select a column from one of the tables on the left, the statistical
data is reflected in the information on the right.
The Get Execution Plan with Statistics option executes an INSERT EXPLAIN WITH
STATISTICS command for the SQL Statement. The statistic data is placed in the
TableStatistics table within the QCD database. The statistics data is then gathered by
running a HELP STATISTICS command with the given table name, column name, and
query ID. HELP STATISTICS retrieves the information from the TableStatistics table.
The QCF requires a Query Capture Database (QCD) that contains specific table definitions.
An INSERT EXPLAIN INTO your_qcd_name AS name_of_SQL_File
SQL_Statement command is executed to create and insert the step information into the
QCD. The SQL File name for your SQL statement is also stored in the QCD using the AS
name_of_SQL_File clause.
You must create the QCD database before attempting the Get Execution Plan or Get
Execution Plan with Statistics option from within the SQL Tools selection menu. You
create the QCD database by clicking Create QCD Database to open the Create Database
dialog. You can also refer to a QCD that was created using the Teradata Visual Explain
product Control Center or to an existing database as your designated QCD database.
If you are using the Teradata Visual Explain product to create your QCD database, the QCD
tables are created automatically. If you used the Create Database dialog or manually created
your QCD database using an SQL command, you must create the QCD tables. To create the
tables, click Create QCD Tables.
Note: You must have SELECT, EXECUTE, and INSERT privilege on the QCD. If the QCD
and its tables are created by the preference screen, CREATE and REPLACE privileges are also
required.
Element Description
Connected Profile List of currently connected profiles. Select the name of the connected
Name profile to use when getting the execution plan.
QCD Database Name List of databases for the connected profile you selected. Select the QCD
database name to use when getting the execution plan.
Create QCD To enable this button, select a connected profile. It opens the Create
Database dialog.
Create QCD Tables To enable this button, select a database from the database selection list. It
is used to create the QCD tables in the QCD database. A confirmation
message indicates the tables were created successfully.
Save Association To enable this button, select a profile and database. It is used to save the
profile/QCD database names in the association table.
Element Description
Profile/QCD Contains the list of profile/QCD database name associations. The
Association Table associations are stored in the user workspace and used by the Teradata
Execution Plan Service when one of the following requests is made:
Get Execution Plan or
Get Execution Plan with Statistics - provides the capability to run the
INSERT EXPLAIN command WITH STATISTICS. This indicates
that statistics for the WHERE clause condition columns specified in the
SQL_Statement are to be captured. This is equivalent to performing
COLLECT STATISTICS (QCD Form) on the query table columns.
The columns inserted into the QCD are those determined to be index
candidates by the Teradata Index Wizard.
Note: You must create the QCD database before attempting the Get
Execution Plan or Get Execution Plan with Statistics option from
within the SQL Tools selection menu. You create the QCD database by
clicking Create QCD Database to open the Create Database dialog.
You can refer to a QCD that was created using the Teradata Visual
Explain product Control Center or to an existing database as your
designated QCD database.
Remove Association To enable this button, profile/QCD database name associations must exist
in the Association Table. Select the profile name and click Remove
Association to remove a profile/QCD database name association from the
table.
Statistics Sample Percentage of data to be read for collecting statistics when the user chooses
Percentage % the Get Execution Plan with Statistics SQL Tools menu option. Valid
percentage values are between 0 and 100. A value of 0 indicates that the
option is not used. Otherwise, the USING SAMPLE clause is added to the
INSERT EXPLAIN WITH STATISTICS command to create the
execution plan in the QCD.
Comparison Actions
The SQL Development Execution Plan View Preference dialog enables you to configure the
execution plan option type and Query Capture Database associations. Plan Types - Select
the execution plan type. Use the drop down list of supported plan types to select a type.
Plan Type Description
XML The system provides the plan displayed in XML format. This
option is only supported on Teradata version 13.0 and higher.
When getting the execution plan for Macro routines, the Teradata
Execution Plan service only supports the Text plan type.
Graphical You must provide a Query Capture Database (QCD).
Query Capture Database You must specify the name of the connection profile and its
associated QCD database name.
Statistics
The Statistics Collection view lets you collect statistics on table columns and indexes.
Collecting Statistics on columns or indexes is important to producing query plans. You can
think of the view as a container that holds statistics collection objects prior to running the
actual collect statistics SQL command on the collection objects.
The Teradata Plug-in for Eclipse and Studio products provide this view as a way for you to
collect statistics on the required collection objects.
These options are available for adding columns or indexes to the statistics view:
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 selectingTeradata >
Statistics > Collect.
Drag and drop to Statistics Collection Selects columns or indexes from the Data Source Explorer
View to 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.
The Collect Statistics wizard automatically generates and runs the collect statistics SQL on
selected columns, multi-column, and index collection objects. The dialog also allows you to
edit the various collect statistics SQL parameters before running the SQL on the collection
objects. By default the wizard only generates index-style collect statistics SQL which is the
most recommended syntax to be used for Teradata Database version 14.0 and above.
You can launch the dialog from the Collect Statistics view by clicking Collect.
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 Displays a check mark when the collection objects already have statistics defined
Statistics 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.
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.
Length The 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.
Option Description
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
Ordering select 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.
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.
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.
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 greater than ( ) operator and enter the value 999.
Option Description
None No filter rule. This is the default.
Equal to value
The Collect Statistics wizard automatically generates the collect statistics SQL which can be
previewed using the SQL Preview page.
The options are:
Option Description
Save SQL Saves the SQL to the file you select.
Show In Editor Displays the SQL in the SQL Editor. The Collect Statistics wizard does
not close.
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.
An Outline Viewer is displayed to the right of the graphical display. This shows a high-level
outline view of the SQL Statements.
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.
Table Data Grid
The Table Data Editor displays rows and columns of a database table in a
spreadsheet grid format that shows relationships of data in the table. To update and
see the most current view of this data, click Refresh in the toolbar.
Status Bar
This area displays error and system messages.
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.
Actions on Rows
Right-click a row or cell and select an option from the list.
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
Export is 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.
Select All description
Right to left Reading order description
Show Unicode control description
characters
Insert Unicode control Select from the list the Unicode control character to insert.
character
Open IME description
Reconversion description
Status Bar
The status bar at the bottom of the gird shows errors and Save status for the Table Data
Editor.
The Table Data Editor gives you the ability to manage data stored in Teradata databases.
Begin by using the Data Source Explorer view to find the table object you want to review or
modify.
1. Open the Data Source Explorer view (Window > Show View > Data Source Explorer).
2. Navigate to the table you want to review or modify.
3. Right-click the table object and select Data > Edit Data.
The Table Data Editor opens in the right pane and displays the data in the table you
selected.
You can also open the Table Data Editor from the Data Lab view.
1. Open the Data Lab view (Window > Show View > Data Lab View).
2. Navigate to the table you want to review or modify.
3. Right-click the table object and select Edit Data.
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.
Option Icon Label Description
Select First Page Goes to the first page of table data pages.
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.
Refresh Refreshes table data list from data in the database.
You can set preferences that determine the appearance and functional behavior of the Table
Data Editor. You can accept the defaults or select new settings.
1 Select Window > Preferences in the main menu.
2 Expand Teradata Datatools Preferences and select Table Data Editor Preferences.
3 Under Color Options, do the following:
a Select the Display alternate Result Set rows in color check box to display an alternate
row background color, and click the color box to select the alternate row color.
b In Insert selection color, click the color box to select the background color for
inserted data.
c In Update selection color, click the color box to select the background color for
updated data.
d In Delete selection color, click the color box to select the background color for
deleted data.
4 Under Editor Options, do the following:
a Select Show Row Numbers to show a numbered row column in the table data grid.
b In Filter Row Threshold Size, enter the number of table rows above which the Table
Data Editor presents the Data Filter dialog.
You must then specify filters to reduce the number of data rows that the Table Data
grid displays. The default is 150000. The maximum is 10000000 rows.
c In Transaction Row Threshold Size, enter the number of data rows to batch in a
single transaction.
This number is the threshold at which the batch UPDATE operation occurs. The
default is 500.
5 Under Copy and Paste Options, do the following:
a Select the Copy Column Names when Copying Rows check box if you want to
include column header labels when copying data to a file.
b In Copy Column Delimiter, select from the list the type of delimiter to use to
separate data when copying from the editor to a file, such as Microsoft EXCEL or
Notepad.
Supported delimiters are: Tab (default), Column, Semicolon, and Space.
You can also specify a single-character delimiter, instead of selecting from the list.
c In Paste Column Delimiter, select from the list the type of delimiter to use to
separate data when pasting rows into a table from a file.
Supported delimiters are: Tab (default), Column, Semicolon, and Space. You can
also specify a single-character delimiter, instead of selecting from the list.
6 Click Apply to apply your changes.
You can preview results in the Table Data Editor before you click OK.
7 After previewing, if you want to return to default values, click Restore Defaults.
8 Click OK to save your preference settings.
Set preferences to determine how the Table Data Editor displays. You can set these features:
Show or hide numbered row column header
Background color for alternate table rows
Highlighted row color for inserted, updated, and deleted data
Thresholds for filter and transaction rows
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,
rows in color and 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 Enter the number of table rows above which the Table Data
Threshold (rows) Editor 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 Enter the number of data rows to batch in a single COMMIT
(rows) 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 Rows copying 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.
Actions
Apply, restore, or save your settings by choosing from these options:
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.
a Select the Display alternate Result Set rows in color check box to display an alternate
row background color, and click the color box to select the alternate row color.
b In Insert selection color, click the color box to select the background color for
inserted data.
c In Update selection color, click the color box to select the background color for
updated data.
d In Delete selection color, click the color box to select the background color for
deleted data.
4 Under Editor Options, do the following:
a Select Show Row Numbers to show a numbered row column in the table data grid.
b In Filter Row Threshold Size, enter the number of table rows above which the Table
Data Editor presents the Data Filter dialog.
You must then specify filters to reduce the number of data rows that the Table Data
grid displays. The default is 150000. The maximum is 10000000 rows.
c In Transaction Row Threshold Size, enter the number of data rows to batch in a
single transaction.
This number is the threshold at which the batch UPDATE operation occurs. The
default is 500.
5 Under Copy and Paste Options, do the following:
a Select the Copy Column Names when Copying Rows check box if you want to
include column header labels when copying data to a file.
b In Copy Column Delimiter, select from the list the type of delimiter to use to
separate data when copying from the editor to a file, such as Microsoft EXCEL or
Notepad.
Supported delimiters are: Tab (default), Column, Semicolon, and Space.
You can also specify a single-character delimiter, instead of selecting from the list.
c In Paste Column Delimiter, select from the list the type of delimiter to use to
separate data when pasting rows into a table from a file.
Supported delimiters are: Tab (default), Column, Semicolon, and Space. You can
also specify a single-character delimiter, instead of selecting from the list.
6 Click Apply to apply your changes.
You can preview results in the Table Data Editor before you click OK.
7 After previewing, if you want to return to default values, click Restore Defaults.
8 Click OK to save your preference settings.
The Table Data Editor enables you to update data in a database table by:
Inserting table data.
Deleting table data.
Reverting table data.
In addition, it also provides several editors for large data tables. Editors include:
CLOB Editor
BLOB Editor
Large Binary Editor
Large Text Editor
XML Data Type Editor
2 Select Insert.
3 Enter data in the new row at the bottom of the table.
4 Click in the toolbar to save your changes.
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
with equal to the value you enter.
Show Values Greater Type a numeric value to match against column data values that are
than greater 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:
Option Description
Show Values that Type a value to match against the initial characters of a data value in the
Start with selected column. The field supports alpha-numeric characters. Do not use
special characters or wildcards.
Show Values that Type a value to match against the end characters of a data value in the
End with selected column. The field supports alpha-numeric characters. Do not use
special characters or wildcards.
Show Value that Type the value you want to match against characters contained in data
Contains values in the selected column. The field supports alpha-numeric
characters. Do not use special characters or wildcards.
6 Click OK.
You can undo a deletion by clicking in the toolbar or right-clicking the row and selecting
Revert.
You can right-click a table cell to display the Delete option. The Delete function deletes only
data in a cell, and does not delete the selected table cell.
1 Select a table cell. The cell background color changes when you select it.
2 Right-click and select Delete.
3 Click in the toolbar to save your changes.
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.
1 Click the Revert icon ( ) in the toolbar.
2 Confirm that you want to revert the contents of your data sheet by clicking OK.
The Table Data Editor refreshes and shows the data reset to pre-edited values.
You can find specific data values in a table column and replace it with a different value. You
cannot replace values across columns in a table.
1 Right-click in the column header of the column that contains the data you want to find
and replace.
2 Select Find/Replace.
3 In Find, type the value you want to find.
4 In Replace With, type the value you want to replace the found value with.
5 [Optional] Under Options, select these check boxes:
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.
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.
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.
Find/Replace Criteria
As an option, you can specify additional criteria for a Find/Replace operation by selecting the
following check boxes:
Option Description
Case Sensitive Select to find only case-exact matches.
Option Description
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.
After you modify data in a table, you can select to view only the edited data rows. Filters are
available for updated, deleted, or inserted data. This feature is useful if you've made multiple
changes in a large table and want to review your changes before updating them in the
database. It can also be used to group changes for export to a file, either as a record or for
later review.
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.
After you make an edit, you can preview the generated SQL DDL statements. The SQL DDL
statement includes updates and other changes that are submitted to the database when you
save your changes.
You can use the Table Data Editor to review and edit database tables that contain Binary
Large Objects (BLOBs). A BLOB is a collection of binary data stored as a single entity in a
Database Management System (DBMS). BLOBs are typically images, audio, or other
multimedia objects, though sometimes binary executable code is stored as a BLOB. You must
edit BLOBs in the Blob 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
A BLOB data object can be represented in one of three ways:
BLOB handle - Handle to the BLOB 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. BLOB data larger than 64k cannot be edited in the Blob Editor.
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.
Also you can export the data to a binary data file to review and edit the data, and then
import that data back to the Blob Editor.
You can use the Table Data Editor to review and edit database tables that contain Character
Large Objects (CLOBs). A CLOB is a collection of character data stored as a single entity in a
Database Management System (DBMS).
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.
Encoding Standard
The Encoding fields shows the encoding standard used for the data in the editor
workarea. Use the drop-down menu to select a different standard.
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.
You open the Large Binary Editor from the Table Data Editor by selecting the row that
contains large binary data in a table. The Large Binary Editor provides a large workarea
where you can review and modify data, and export and import data.
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.
You can use the Table Data Editor to display and edit tables that contain character data. A
large text data table contains large amounts of character data stored as VARCHAR data type
and must be edited in the Large Text Editor.
Encoding Standard
The Encoding fields shows you the encoding standard used for the the data in the
editor workarea. Use the drop-down menu to select a different standard.
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.
You can use the Table Data Editor to access Extensible Markup Language (XML) data type
objects stored in the connected database. To edit the data, you must edit the XML data type
object in the XML Editor.
Encoding Standard
The Encoding field shows the encoding standard used for the data in the editor
workarea. Use the drop-down menu to select a different standard.
XML Editor
The XML Editor displays the Extensible Markup Language (XML) data contained in the
selected XML data type object stored in a database. An XML data type object is represented
by the handle to the XML data stored in the database.
You can edit the data in the XML object by:
Inserting XML data
Clearing the XML data in the object
Importing XML data from a file
Exporting the XML data in the object to a file
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.
The Table Data Editor provides several ways to filter table data.
You can filter data:
To view only data of interest in columns. See Displaying Column Data by Value.
To view only rows in which you have inserted, updated, or deleted data. See Selecting to
Filter by Edits.
To view data of interest using Data Filter rules. See Filtering with Data Filter.
The Data Filter dialog enables you to set filter rules to define which data is loaded and
displayed in the Table Data Editor. Each time you use this dialog, the data is reloaded into
the editor based on the rules you specify. To access the Data Filter dialog, click the Filter
icon in the Table Data Editor toolbar.
The dialog consists of two tabs described below.
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:
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. This is the default.
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.
Action Buttons: Order Columns for Sorting
Move columns up or down in the list. The sort operation uses the column order to
determine sorting rules. The primary sort is based on the first column in the list.
Related Topics
Filtering with Data Filter, on page 240
2 Right-click Tables.
3 Select the Data Transfer command for the database type you are transferring data from:
Teradata Database
Teradata Aster Database
Hadoop
Option Description
Data > Export Data Exports data from the selected table.
Data > Load Data Imports data to the selected table.
The Data Transfer Wizard provides an initial dialog that enables you to select the source and
destination for your data transfer operation. The wizard pre-populates fields based on the
database object you select in the Data Source Explorer navigation pane. When you click
Launch, the wizard opens the appropriate dialog to collect additional information about your
data transfer.
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.
The Data Transfer Wizard also displays when you drag and drop table objects inside the
Data Source Explorer or from Data Source Explorer to the Transfer View and Data Lab
View. If you use the drag and drop method, you are asked to view and assign a mapping for
the table column types and set the file type and delimiter if needed.
The Data Transfer Wizard also displays when you drag and drop table objects inside the
Data Source Explorer or from Data Source Explorer to the Transfer View and Data Lab
View. If you use the drag and drop method, you are asked to view and assign a mapping for
the table column types and set the file type and delimiter if needed.
Teradata Destination
You cannot edit Destination information. Teradata Connection Profile shows the
Connection Profile that is connected to the Teradata Database system. Teradata
Table shows the database.table name of the table selected to receive data.
Transfer From
You must specify 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 Teradata table.
Hadoop System
Select 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
Select the database that contains the source table from the list.
Hadoop Table
Select the source table that contains the data to transfer.
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.
File Specifications
Specifies the destination file type and the delimiter to use when transferring the data.
Columns To Transfer
Selects the columns in the Teradata table to transfer to the Hadoop table. By default
the column type of the Hadoop table is based on the column type of the source
Teradata 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. You can
also select all columns or no columns to transfer by clicking buttons at the bottom of
the list.
Transfer Job
Names the transfer job displayed at the bottom of the screen. You can change the job
name. The job name can be useful if the export is an operation that you might re-
execute in the future.
Reset All Values
Sets all the fields back to their default values.
When you click Finish, the wizard closes and the settings are passed to the Transfer
Progress View where you can monitor the status of the transfer job.
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
Filter by data For each table column select a filter value from the Select By list
and type the paired value. For example, the filter "> 200""
includes only those values greater than the numeric value 200.
12 Review the generated SQL/DDL in the SQL Preview Filter and edit the SQL/DDL
statements if needed.
13 Click Finish.
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.
Related Topics
Aster Data Types, on page 332
Aster Definition
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.
Another option when transferring Hadoop data to Aster is to drag and drop a Hadoop table
object to an Aster table object in Data Source Explorer or Object Viewer. The Data Transfer
Wizard launches and opens the Column Specification dialog to allow you to specify which
columns to transfer to the Aster table.
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 SmartLoad utility.
When you click Finish, the wizard closes and the settings are passed to the Transfer
Progress View where you can monitor the status of the transfer job.
The Teradata Transfer History view provides an enhanced display of the Data Transfer
History information in the database. As data transfers are performed, an entry is placed in
the Transfer History. The Transfer History view displays the data in a grid format that
enables you to select rows or cells.
The Transfer History view provides extensive 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. It provides options to:
Copy selected cells to the clipboard
Sort columns
Delete rows
Edit "Note" or "Name" for a history entry
Filter columns
Search for transfer history data
Hide and show columns
Auto-resize columns or rows
Display the job output for a History entry
The Transfer History view uses an embedded Derby Database to manage the Transfer
History entries.
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
Icon Option Description
Edit name Click to edit the name of the transfer history entry.
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.
Filter display Click to open a dialog to filter display.
Clear filter Click to clears the filter and refresh the transfer history display.
Toolbar Menu
Icon Option Description
Edit Name Click to edit the name 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.
Reexcute 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
Column Name Description
Name Name of the transfer job.
Timestamp Time of transfer event. Format is yyyy-mm-dd
hh:mm:ss.mm.
Source Profile name for database that was the data
source for the transfer.
Destination Profile name of the database to which the data
was transferred.
Status Status of the transfer event.
Duration Length of time required to transfer data between
the source and destination. The format is
hh:mm:ss.mm.
Rows Transferred Number of table rows transferred.
Note Text notes about transfer event.
Summary Technical summary describing transfer source
and destination paths.
The Transfer History Filter dialog enables you to filter rows in the transfer history view.
Only rows meeting the filter criterion are displayed.
Note: New data transfers appear regardless of whether or not they meet the filter criterion.
There are three types of filter criterion:
LIKE, where '_' matches a single character, '%' matches 0 or more characters, like using
abc% to filter values that start with 'abc'
EQUALS (=), which is equals match
Less than, equal, greater than(<, =, >), which is a less than, equals, or greater than match
Selection, which is a list selection match.
The dialog contains the following elements:
Element Description
Name Filters on the Name column. This is a "LIKE" filter.
Timestamp Filters on the Date portion of the Timestamp column. There are two options. If
"day's" is selected, the indicated number of days history is displayed. "1" indicates
the current day, "2" indicates today and the day before. If the "day's" check box is
cleared, choose the operation, "<, =, >" and choose the date.
Source Filters on the Source column. This is a "LIKE" filter.
Destination Filters on the Destination column. This is a "LIKE" filter.
Status Filters on the Status column. Choose from the selection list Completed,
Canceled, or Failed.
Duration Filters on the Duration column. This is a less than, equal, greater than filter.
Rows Filters on the Rows Transferred column. This is a less than, equal, greater than
Transferred filter.
Note Filters on the Note column. This is a "LIKE" filter.
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.
The Transfer Progress View displays a list of executing data transfer jobs and their status. It
provides information about the source and destination tables for the data transfer, name of
the transfer job, and start time, as well as the current elapsed time for the transfer operation.
A progress bar appears in the right-most column for each executing job and shows the
current progress state of the transfer compared to the estimated length of time to
completion.
The Transfer Progress View runs a single job to completion before it starts the next job. If
multiple jobs are submitted at the same time, the jobs are placed in a queue and run in
sequence.
If you close Teradata Studio while jobs are running or queued, the jobs are cancelled.
Cancelled jobs are moved to the History View where you can re-execute the jobs at a later
time. If you close the view and need to re-open it, go to Window > Window > Transfer
Progress View. The Transfer Progress View automatically displays when you select the Data
Transfer perspective.
Menu Description
Start Time Displays the time stamp for the start of the data transfer operation.
Time Elapsed Displays how long the job has been running. The entry displays
"CANCELING" if the transfer is in the process of being canceled.
The elapsed time value is updated continuously until the transfer
completes.
Summary Displays the names of the source and destination tables for the
transfer job.
Progress When a transfer job is running, the Progress bar shows the
percentage of completion by displaying a green bar that gradually
expands in length as the job progresses.
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.
Icon Menu Description
Cancel Cancels the selected job in progress. The cancelled job
displays in the Transfer History View.
Transfer Details Opens the Transfer Details dialog that displays the
output from the transfer job while it is running. After
the job completes, the output is available in the
Transfer History View.
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.
Once you have selected the table to receive the data in the Data Source Explorer, You can
specify the type of data import you want performed.
Note: You must select External File (FastLoad) 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. Be sure to specify data delimiters and encoding used in the source file. Use the
Section Description
Data Import Use this section to specify the name of the file from which to import data and to
from External specify the server path to its location in the file system. To locate an existing file,
File click Browse and navigate the file system to select a file. 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.
Data Import Column Labels in First Row Specifies that the first row of the source file contains
Options the column labels to load as column headers in the
table.
Stop Loading If Max Error(s) Specify the maximum number of errors allowed
Occur before the wizard stops the Load operation.
Section Description
Lock Table Select to lock the table during the load operation to
prevent any other Read/Write transactions on the
table. This feature is not available for Aster data
transfers.
Replace Existing Data Select to replace all existing data in the table with
the imported data from the file.
Import File You must specify how the source file delimits the data it contains. A delimiter is a
Delimiters character or sequence of characters that specify the boundaries of independent
and Encoding regions of data in plain text by distinguishing the beginning and end of the unit of
data, such as a field value. You can select commas, semicolons, spaces, tabs, fixed
widths, or vertical bars (|). You can optionally specify the character string delimiter
and type of file encoding used.
Data in Data contained in the external file displays at the bottom of the wizard screen. Table
External File data includes column name, column data type, and values in table rows.
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. The Delimited Text options
are:
Option Description
Column Delimiter Specify the column delimiter used in the input file.
Option Description
Character String Delimiter Specify the character string delimiter used in the input file.
Line Separator If you selected the Delimited Text file type, the File Options
section enables you to 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 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.
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.
1 Open the Data Transfer perspective by clicking on the Data Transfer tab.
2 Select a table object in the Data Source Explorer as the destination table for the data
load.
3 Right-click the table and select Data > Load Data.
If you do not have the Data Transfer perspective open, you are asked to switch to the
perspective.
4 In the Data Transfer Wizard, select External File as the Source Type.
5 Click Launch.
The Load Data Wizard opens.
6 In the Import Data into <filename>, type the directory path and name of the file that
contains the data you want to import.
To find a file in your file system, click Browse, select the file, and click Open.
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 [Default] Select the Stop Loading If Max Error(s) Occur check box and specify the
maximum number of errors allowed before the Load operation stops.
10 [Optional] Select the Lock Table check box to lock the source and destination tables
during the Load operation.
11 [Optional] Select the Replace Existing Data check box to specify that data in the source
file replaces any existing data in the destination file.
12 In step 10, if you selected Delimited Text, complete the following File Options fields.
a In Column Delimiter, select the delimiter that you want used to separate data.
Comma Uses commas (,) to separate data in destination file
Semicolon Uses semicolons (;) to separate data in destination file
Space Uses blank spaces to separate data in destination file
Tab Uses Tabs to separate data in destination file
Fixed Width Uses fixed width columns to separate data. Specify in the Fixed
Width Columns field a numeric value for the fixed column width.
I Inserts a vertical bar (I) to separate data
b Select the Character String Delimiter to use to distinguish string text.
The options are " (double-quotes), ' (single quote), or None.
c 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)
d 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.
e In Start Loading At Row Number, type the table row number at which you want the
wizard to start loading data.
A sample of the input file based on the options you select displays below the File
Options. If you change the values selected in File Options fields, the sample row
display also changes.
13 Click Finish.
The wizard returns you to the Transfer History View where you can view the report on
the Load operation success or failure.
The JDBC Driver returns SQL warnings if it determines that a FastLoad operation is not
possible. This might be due to incompatible column data types; for example, CLOB or BLOB
data types. If this occurs, the JDBC Driver processes the batch insert in a non-FastLoad
mode.
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.
JDBC Time escape format is: hh:mm:ss.
JDBC Timestamp escape format is: yyyy-mm-dd hh:mm:ss.ffffff.
The Smart Load Wizard enables you to create Teradata and Aster tables derived from data
stored in an external file on your file system.
Option Description
For Teradata Tables Right-click a Teradata Tables node and select Teradata - Data Transfer.
For Aster Tables Right-click an Aster Tables node and select Aster - Data Transfer.
5 In the Smart Load Wizard, type the directory path and name of the file that contains
data you want to import.
To find a file in your file system, click Browse, select the file, and click Open.
6 Select one of the following options in File Type:
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] In Drop Table if Max Error(s) Occur, type the maximum number of errors
that a table can have before it is dropped from the import operation.
9 [Optional] If you selected Delimited Text, select the Quick Scan check box to scan the
file partially when trying to derive a table from the imported data.
This option is only available for delimited text files, such as TXT and CSV files.
10 If you selected Delimited Text, use the list in Column Delimiter to select the delimiter
that is used to separate data in the input file.
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.
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 If you selected Excel, in Import Worksheet, select the name of a worksheet in the
external file to import only that worksheet.
15 Click Next.
The Table Column Data Types screen displays.
16 In Table Name, type the name of the table to be derived from the loaded data.
17 In Primary Index, select one of the following options:
Option Description
No Primary Select if no primary index is to be created for the table. The Teradata primary
Index index is used to evenly distribute data among AMPs.
Not Unique Select if the Teradata primary index for the table is to be of the type NON-
UNIQUE. A non-unique primary index permits the insertion of duplicate field
values.
Unique Select if the Teradata primary index for the table is to be of the type UNIQUE. A
unique index must have a unique value in the corresponding fields of every row.
Option Description
Click Next Enables you to preview 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 will close.
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 In Type select the data type for the column you are editing.
For a description of data types listed, see Smart Load Type Options.
2 Select the Can contain nulls check box if the data in the column can include null values.
This action de-selects the Values must be unique check box if it is selected.
3 Select the Values must be unique check box if the data in the column must be unique
values.
This action deselects Can contain nulls.
4 If you selected SMALLINT as the data type, you can select the Distribute by Hash check
box 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.
5 Click OK.
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 [Default] Select the Drop Table If Max Error(s) Occur check box and specify the
maximum number of errors allowed before the Load operation stops.
10 [Optional] Select the Quick Scan check box to scan the file partially when trying to
derive a table from the imported data.
This option is only available for delimited text files, such as TXT and CSV files.
11 In step 10, if you selected Delimited Text, complete the following File Options fields.
a In Column Delimiter, select the delimiter that you want used to separate data.
Comma Uses commas (,) to separate data in destination file
Semicolon Uses semicolons (;) to separate data in destination file
Space Uses blank spaces to separate data in destination file
Tab Uses Tabs to separate data in destination file
Fixed Width Uses fixed width columns to separate data. Specify in the Fixed
Width Columns field a numeric value for the fixed column width.
I Inserts a vertical bar (I) to separate data
b Select the Character String Delimiter to use to distinguish string text.
The options are " (double-quotes), ' (single quote), or None.
c 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)
d 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.
e In Start Loading At Row Number, type the table row number at which you want the
wizard to start loading data.
A sample of the input file based on the options you select displays below the File
Options. If you change the values selected in File Options fields, the sample row
display also changes.
12 In step 10, if you selected Excel or Excel 97-2003, complete the following File
Options fields.
a [Optional] In Import Worksheet, select an individual worksheet in the input Excel
file to import.
b In Start Loading At Row Number, type the table row number at which you want the
wizard to start loading data.
13 Click Next.
The Table Column Data Types screen displays.
14 In Table Column Data Types specify the name of the table to be derived from the
loaded data.
15 In Table Type select one of the following options:
Option Description
DIMENSION Describes the information in fact tables and contains attributes used for
grouping, constraining, and reporting fact table data.
FACT Contains numeric measurements such as aggregates, averages, and summations.
Fact tables are surrounded by dimension tables which analyze or dimension the
data in a fact table.
Option Description
Click Next Enables you to preview the SQL 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 will close. 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 In Type select the Aster data type for the column you are editing.
For a list of data types supported in Smart Load Wizard, see Aster Data Types.
2 Select the Can contain nulls check box if the data in the column can include null values.
This action de-selects the Values must be unique check box if it is selected.
3 Select the Values must be unique check box if the data in the column must be unique
values.
This action deselects Can contain nulls.
4 Select the Distribute by Hash check box if you want to specify a distribution key column.
Using DISTRIBUTE BY HASH with a distribution key is mandatory for fact tables and
optional for dimension tables. You must select at least one column in the table to
distribute by hash.
5 Click OK.
The Export Data Wizard enables you to export data from a table to a file in a file system.
Controls
Control buttons are used to move forward or backward within the Export Data
Wizard. When you are ready to export data, click Finish. A Progress Information
dialog displays to show the progress of the export task.
You can select a database table in the Data Source Explorer and export the data in the table
to a TXT, CSV, XSL, or XSLX file in your file system. When you select to export data to an
external file, the Export Data Wizard opens and prompts you for information about the data
transfer operation.
1 Select a table object in the Data Source Explorer to use as the source table for exporting
data to a file.
2 Right-click the selected table object and select Data > Export Data.
3 In the Data Transfer Wizard, select External File (FastExport) as the Destination
Type.
The Export Data Wizard opens.
Related Topics
Copying Table Data Between Teradata Databases, on page 337
Dropping Objects on Transfer View, on page 337
You can copy Teradata table objects in the Data Source Explorer to another database.
1 Open two Connection Profiles, one for the source database system and another for the
destination system.
2 Open the Data Source Explorer.
3 Navigate to the database and Tables folder to which you want to copy data from another
table.
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.
The Copy Object Wizard copies Teradata table data from one Teradata Database to another.
1 Open the Data Source Explorer and navigate to the Tables folder in a Teradata
Database.
2 Right-click a table object and select Data > Load Data.
3 In the Data Transfer Wizard, select Teradata as the Source Type and click Launch.
4 Select the table to copy by specifying Source information:
a Select from the list the Teradata Connection Profile that contains the table to copy.
Objects can be dragged from the Data Source Explorer and dropped into the Transfer View
and back to copy from one database to another.
The following instructions are specific to dragging from Data Source Explorer and dropping
into the Transfer View.
1 Open two Connection Profiles, one for the source database system and another for the
destination database system of the transfer.
2 Open the Data Source Explorer and navigate to the Teradata Database object you want
to copy to another system.
3 Open the Transfer View by opening the Data Transfer perspective or selecting Window >
Show View > Transfer View.
4 In the Transfer View, use the Teradata system to which you want to copy the object from
the Select Profile list.
If the system you want is not listed, return to the Data Source Explorer and right-click
Database Connections to select New and connect to the correct profile.
5 Select the Data Source Explorer object and drag and drop it into the Transfer View pane
to launch the Copy Object Wizard.
Be sure to drop the object on a folder of the same type or on a database/user folder.
6 Verify that the information shown for Source and Destination systems is correct, and
the object to be copied is correct.
The name of the source object is used by default to identify the destination object.
7 [Optional] If copying a table object, select from these options:
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,
existing table and 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.
When you drag and drop a table from the Data Source Explorer both the Copy source and
destination Teradata Database names display in the Copy Table screen of the Copy Object
Wizard.
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.
The Copy Object Wizard supports copying the following objects from one Teradata Database
to another. In addition, Table and Table Data can be copied from a Teradata Database to a
Data Lab.
Database
User
Table and Table Data
Macro
SQL Stored Procedure
SQL User-defined Function
Hash Index
Join Index
User-defined Type
View Definitions
from tables in different Teradata systems, the Copy Object Wizard performs the data
transfer.
The Copy Object Wizard consists of several screen interfaces:
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.
Related Topics
About Copying Teradata Objects, on page 335
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
destination table copied data.
Related Topics
Column Data Type, on page 344
Save DDL
Saves the DDL to a file where you can continue to edit the text and run the copy
operation at a later time.
Troubleshooting
Troubleshooting Studio
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.
Parameter Tuning