Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Client Tools
2
Application Utilities
Client Tools
3
Application Utilities .
Client Tools
4
Application Utilities .
Operating System
BTEQ
Fast
Loa
d
Support Environment
Mult
i
Loa
CLI
d
Host
Server
Fast
Expor
t
TPum
p
Client Tools
5
Applicati
on
Request
CLI
MTDP
MOSI
Response
Serve
r
Client Tools
6
Data Flow
Host
BTEQ
FastLoad
MultiLoad
Gateway
PE
AMP
AMP
PE
AMP
Data
Disk
AMP
Data
Disk
Disk
Disk
Client Tools
7
Application Development
More
INMODs
FlexibilityApplication
Less
Utilities
Easy
Ease of Use
Difficult
Client Tools
8
Client Tools
9
ORACLE
Userwritten INMOD
FastLoad, MultiLoad, TPump,
Server
10
Client Tools
BTEQ
FastLoad
Fast Export
MultiLoad
TPump
Client Tools
11
BTEQ
Client Tools
12
BTEQ
Request Flow
BTEQ script
.logon
select
.logoff
CLI
BTEQ
MTDP
MOSI
Server
PE
AMP
AMP
Data
Data
AMP
AMP
Data
Data
Client Tools
13
Response Flow
BTEQ script
.logon
select
.logoff
CLI
BTEQ
MTDP
PE
BTEQ
Server
AMP
AMP
Data
Data
MOSI
AMP
AMP
Data
Data
Client Tools
14
Conditional Logic
BTEQ
Client Tools
15
BTEQ
Client Tools
16
Command Set
BTEQ
Client Tools
17
BTEQ
Client Tools
18
BTEQ
Client Tools
19
BTEQ
Client Tools
40
BTEQ
Client Tools
41
EXPORT
BTEQ
Client Tools
42
BTEQ
EXPORT
BTEQ Script
.logon
mac/user,passwd
.export data
file=x.dat
sel * from table;
.export reset
.quit;
BTEQ
Logon complete
1200 rows returned
Time 15 seconds
Default Output
12348009
23498763
8568733
933435490
x.dat
Client Tools
43
.EXPORT
.EXPORT
.EXPORT
.EXPORT
EXPORT Types
BTEQ
REPORT
DATA
INDICDATA
DIF
.EXPORT RESET
Reverses the effect of a previous .EXPORT
Client Tools
44
BTEQ
Data Modes
column B
2
5
8
column C
3
6
9
Client Tools
45
Data Modes .
field4
BTEQ
Client Tools
46
Data Modes .
BTEQ
Client Tools
47
BTEQ
Indicator Variables
BTEQ
BTEQ
FastLoad
MultiLoad, Fast
TPump
NULL Columns
F F
010010 00000000
1 2
00
F
3
F
4
F
5
F
6
F
7
..
.
F1
2
Client Tools
48
BTEQ
Client Tools
49
BTEQ
Client Tools
50
BTEQ
MultiLoa TPum
d
p
Client Tools
51
FastLoad
Client Tools
52
Purpose/Concepts
FastLoad
Purpose:
Load large amounts of data into an
empty table at
high speed.
Concepts:
Load into an empty table with no
secondary indexes.
Creates two error tables.
Checkpoints can be taken for restarts.
Client Tools
53
Restrictions
FastLoad
Client Tools
54
FastLoad
Phase 1
FastLoad uses one SQL session to define
AMP steps
The PE sends a block to each AMP
AMPs hash each record and redistribute
them to the AMP responsible for the hash
value
Records are written to the target table in
unsorted blocks
Client Tools
55
FastLoad
Phase 1
PE
BYNET
AMP
Disk
AMP
Disk
Client tools
Tools
56
FastLoad
Phase 1
PE
Host
Data
BYNET
AMP
Disk
AMP
Disk
Client Tools
57
FastLoad
Phase 2
When loading completes, each AMP
sorts the target table, puts the rows
into blocks, and writes the blocks to
the disk
Fall back rows are then generated if
required
Client Tools
FastLoad
Phase 2
58
PE
BYNET
AMP
AMP
Data
Disk
Client Tools
59
FastLoad Script
FastLoad
.logon Tdpid/User,Passwd
.begin loading Customer
errorfiles custerr1, custerr2;
define
CustNum ( Integer ),
Name
( Char(20) )
file = CustData.dat;
insert into Customer values
(:CustNum, :Name);
.end Loading;
.logoff;
Name of empty
table
Starts Phase 1
Defines input
record
SQL Insert
statement
Start phase 2;
if omitted
utility will
pause
Client Tools
60
datafil
e1
SQL &
Data
PE
BYNET
AMP
Disk
AMP
Disk
FastLoad
Client Tools
61
datafil
e1 Data
BYNET
AMP
Disk
AMP
Disk
FastLoad
Client Tools
62
datafile
Data
n
BYNET
AMP
Disk
AMP
Disk
FastLoad
Client Tools
63
BYNET
AMP
Disk
AMP
Disk
FastLoad
Client Tools
64
Error Tables
FastLoad
Error Table 1
Contains one row for each row which failed
to be loaded due to constraint violations or
translation errors.
Column_Na
me
Error_Code
Error Field
name
Data Parcel
Content
Error Table 2
Captures rows that contain duplicate values
for UPIs
Client Tools
65
Data
INMOD
INMO
D
FastLoa
d
FastLoad
Teradat
a
Server
Client Tools
66
FastLoad
INMOD/FastLoad Communication
Client Tools
67
FastLoad
FastLoad to INMOD
FastLoad has been restarted. INMOD
3
2
4
5
Client Tools
68
AXSMOD
init-string (optional )
SESSIONS
max [min]
ERRLIMIT
TENACITY
hours
SLEEP
DATEFORM
minutes
integerdate/ansidate
FastLoad
Client Tools
69
BTE
DDL Functions QAll
DML Functions All
Multiple DML
Yes
Multiple tables Yes
Multiple
Yes
sessions
Protocol used
SQ
L
Conditional
Yes
Exp.
Arithmetic
Yes
Calc
Data
Yes
conversion
Error files
No
Error limits
No
User routines
No
FastLoa Fast
dLimite Export
d INS
No
No
Yes
FastLoa
d No
No
Limite
d Yes
Yes
Yes
FastLoad
MultiLoa TPum
d
p
Client Tools
70
Support Environment
Client Tools
71
Invoking Utilities
Support
Environm
ent
Client Tools
72
Invoking Utilities .
Support
Environme
nt
Command
s
Support
Environm
ent
Client Tools
73
Commands
Support
Environm
ent
.LOGOFF
.RUN
.IF/.ELSE
Identifies statements to be
executed if
certain conditions
are true or otherwise
.ENDIF
condition
Client Tools
74
System Variables
Support
Environm
ent
Permits a variable to
be set or reset to an
expression or a preexisting variable
Description
Format
Client Tools
75
Example
.logtable cust_logtable;
.run File Logon;
.IF &SYSDAY NE FRI
THEN
.DISPLAY This job runs
Fridays only TO file
ErrFile;
.LOGOFF;
.ENDIF;
******
******
******
Support
Environm
ent
Create or
acquire restart
Accept
LOGON
log table
string from
Logon File
Check for Day
of week.
Write a
message and
terminate job
if not FRI
Invoke utility
Client Tools
76
Fast Export
Client Tools
77
BEGIN Export
Fast Export
.BEGIN EXPORT
SESSIONS max min
TENACITY hours
SLEEP
minutes
NOTIFY
high | medium | low | ;
To Specify:
Number of SESSIONS required
Number of hours Fast Export will try to
establish a connection
Number of minutes between each logon
attempts
Parameter for specifying the notify user
Client Tools
78
END Export
Fast Export
.END EXPORT
Delimits a series of commands that
define a single EXPORT action
Must be the last directive in a Fast
Export script
Causes the utility to send the SELECT to
the Teradata Database
Client Tools
79
.logtable RestartLog;
Fast Export
Specify sessions.
Destination file.
Send request
Terminate
sessions
Client Tools
80
BTE
DDL Functions QAll
DML Functions All
Multiple DML
Yes
Multiple tables Yes
Multiple
Yes
sessions
Protocol used
SQ
L
Conditional
Yes
Exp.
Arithmetic
Yes
Calc
Data
Yes
conversion
Error files
No
Error limits
No
User routines
No
Fast Export
FastLoa Fast
MultiLoa TPum
dLimite Export
d
p
No
d INS
SEL
No
Yes
No
Yes
Yes
Yes
FastLoa EXPORT
d No
Yes
No
Yes
Limite
Yes
d Yes
No
Yes
No
Yes
Yes
Client Tools
81
MultiLoad
Client Tools
82
MultiLoad
Table A
Table B
update Insert
MultiLoad
Table C
Delete
Table D
Host
Table E
Serve
r
Client Tools
83
MultiLoad Limitations
MultiLoad
Client Tools
84
MultiLoad Tasks
MultiLoad
DELETE task:
These are tasks which execute a single
DELETE statement
on a single table.
Client Tools
85
MultiLoad
IMPORT TASK
inserts
updat
Input
es
Data
delete
s
upsert
MultiLoad s
Hos
t
Apply
Conditions
Serv
er
T
1
T
2
T
3
T
4
T
5
Client Tools
86
Hos
t
MultiLoad
DELETE TASK
Data value
deletes only
MultiLoad
delete Rows
Serv
er
T
1
Client tools
88
MultiLoad
.logtable logtable001;
define
.logon TDPID/User/Passwd;
logtable
.begin mload tables Emploee, Emp_History;
begin
loading
.layout Employee_Trans;
define
.filler Transcode 1 char(3);
.field Empno
* smallint;
.field Deptno
* smallint;
.field Salary
* decimal(8,2);
.dml label payroll;
do insert for missing update rows;
update Employee set Salary = :Salary where
Empno = :Empno;
insert into Employee (Empno, Salary ) values
(:Empno, :Salary );
Client Tools
89
MultiLoad
Client Tools
90
Script Components
MultiLoad
Client tools
91
Script Components .
MultiLoad
Client Tools
92
IMPORT Phases
MultiLoad
Basic setup
DML Phase
on AMPs
Acquisition Phase
to AMPs and
Application Phase
Apply the input data
to the
appropriate target tables
End Phase
Basic clean up
Client Tools
93
Preliminary Phase
MultiLoad
MultiLoad
#AMPS + 2
Two per
One per
Prevent DDL
Client Tools
94
MultiLoad
Client Tools
95
Acquisition Phase
MultiLoad
Client Tools
96
Application Phase
MultiLoad
Client Tools
97
Cleanup Phase
MultiLoad
Client Tools
98
DELETE/IMPORT Differences
MultiLoad
Client Tools
99
Restarting MultiLoad
MultiLoad
DBC restart
MLOAD reinitiated automatically after
DBC
recovery
Continue from checkpoint without user
interaction
Host restart
Resubmit the script as-is
MLOAD determines its stopping point and
restarts
Client Tools
100
BTE
DDL Functions QAll
DML Functions All
Multiple DML
Yes
Multiple tables Yes
Multiple
Yes
sessions
Protocol used
SQ
L
Conditional
Yes
Exp.
Arithmetic
Yes
Calc
Data
Yes
conversion
Error files
No
Error limits
No
User routines
No
MultiLoad
FastLoa Fast
MultiLoa TPum
dLimite Export
d All
p
No
d INS
SEL Ins/upd/d
el Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
FastLoa EXPORT MultiLoa
d No
d Yes
Yes
No
Yes
Yes
Limite
Yes
Yes
d Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Client Tools
101
TPump
Client Tools
102
TPump
Client Tools
103
Limitations
TPum
p
Client Tools
104
.logtable logtbl002;
.logon TDPID/User,Passwd;
.begin load
errlimit 50
checkpoint 1
sessions 11
tenacity 2
error table tlnterr BTET pack 10;
.layout lay1a;
.filler ATest * byteint;
.field AByteInt * byteint;
.field AInteger * integer;
TPum
p
Client Tools
105
TPum
p
Client Tools
106
TPum
p
Client Tools
107
TPump / MultiLoad
TPum
p
Client Tools
108
BTE
DDL Functions QAll
DML Functions All
Multiple DML
Yes
Multiple tables Yes
Multiple
Yes
sessions
Protocol used
SQ
L
Conditional
Yes
Exp.
Arithmetic
Yes
Calc
Data
Yes
conversion
Error files
No
Error limits
No
User routines
No
TPum
p
FastLoa Fast
MultiLoa TPum
dLimite Export
d All
p All
No
d INS
SEL Ins/upd/d I/U/
el Yes
DYes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
FastLoa EXPORT MultiLoa TPump
d No
d Yes
Yes
Yes
No
No
Yes
Yes
Yes
Limite
Yes
Yes
d Yes
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Client Tools
109
Utility support
- Does it run on your host?
Restart capability
- Is there a restart log?
- What happens with a Teradata restart?
- What happens if the host fails?
Multiple sessions
- Does the utility support multiple
sessions?
- How do you choose the optimum
number?
Error handling
- Are errors captured in an error file?
- Do you have control over error