0% found this document useful (0 votes)
55 views58 pages

Loading To Teradata

The document discusses using external loaders in Teradata to load data. It describes three main external loaders for Teradata - Multiload, TPump, and FastLoad - and their best uses based on volume, partitions, and operation. It provides rules for using external loaders, including file name length limits and preventing binary loads. The document also covers overriding the default control file generated by the loader connection in the Workflow Manager.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views58 pages

Loading To Teradata

The document discusses using external loaders in Teradata to load data. It describes three main external loaders for Teradata - Multiload, TPump, and FastLoad - and their best uses based on volume, partitions, and operation. It provides rules for using external loaders, including file name length limits and preventing binary loads. The document also covers overriding the default control file generated by the loader connection in the Workflow Manager.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 58

Loading to Teradata

When you load to Teradata targets, use one of the following external loaders:

M
u
lt
il
o
a
d
.
P
e
rf
o
r
m
s
i
n
s
e
rt
,
u
p
d
at
e,
d
el
et
e,
a
n
d
u
p

s
e
rt
o
p
e
r
at
i
o
n
s
f
o
r
la
r
g
e
v
o
l
u
m
e
i
n
c
r
e
m
e
n
ta
l
l
o
a

d
s.
U
s
e
t
h
is
l
o
a
d
e
r
w
h
e
n
y
o
u
r
u
n
a
s
e
s
si
o
n
w
it
h
a
si
n
g

le
p
a
rt
it
i
o
n
.
M
u
lt
il
o
a
d
a
c
q
u
ir
e
s
ta
b
le
le
v
el
l
o
c
k
s,
m
a
k
i

n
g
it
a
p
p
r
o
p
ri
at
e
f
o
r
o
ff
li
n
e
l
o
a
d
i
n
g
.
T
P
u
m
p
.
P
e
rf

o
r
m
s
i
n
s
e
rt
,
u
p
d
at
e,
d
el
et
e,
a
n
d
u
p
s
e
rt
o
p
e
r
at
i
o
n
s
f
o

r
r
el
at
i
v
el
y
l
o
w
v
o
l
u
m
e
u
p
d
at
e
s.
U
s
e
t
h
is
l
o
a
d
e
r
w
h
e

n
y
o
u
r
u
n
a
s
e
s
si
o
n
w
it
h
m
u
lt
i
p
le
p
a
rt
it
i
o
n
s.
T
P
u
m
p
a
c

q
u
ir
e
s
r
o
w
h
a
s
h
l
o
c
k
s
o
n
t
h
e
ta
b
le
,
al
l
o
w
i
n
g
o
t
h
e

r
u
s
e
rs
t
o
a
c
c
e
s
s
t
h
e
ta
b
le
a
s
T
P
u
m
p
l
o
a
d
s
t
o
it
.
F
a

st
L
o
a
d
.
P
e
rf
o
r
m
s
i
n
s
e
rt
o
p
e
r
at
i
o
n
s
f
o
r
h
i
g
h
v
o
l
u

m
e
i
n
it
ia
l
l
o
a
d
s,
o
r
f
o
r
h
i
g
h
v
o
l
u
m
e
tr
u
n
c
at
e
a
n
d
r
el

o
a
d
o
p
e
r
at
i
o
n
s.
U
s
e
t
h
is
l
o
a
d
e
r
w
h
e
n
y
o
u
r
u
n
a
s
e
s

si
o
n
w
it
h
a
si
n
g
le
p
a
rt
it
i
o
n
.
U
s
e
t
h
is
l
o
a
d
e
r
o
n
e
m
p
t
y

ta
b
le
s
w
it
h
n
o
s
e
c
o
n
d
a
r
y
i
n
d
e
x
e
s.
If you use a Teradata external loader to perform update or upsert operations, use the Target Update
Override option in the Mapping Designer to override the UPDATE statement in the external loader control
file. For upsert, the INSERT statement in the external loader control file remains unchanged.

Rules and Guidelines for Teradata External Loaders


Use the following rules and guidelines when you use external loaders to load to Teradata:

T
h
e
I
n

te
g
r
at
i
o
n
S
e
r
v
ic
e
c
a
n
u
s
e
T
e
r
a
d
at
a
e
x
te
r
n
al
l
o
a
d
e
rs

t
o
l
o
a
d
fi
x
e
d
w
i
d
t
h
a
n
d
d
el
i
m
it
e
d
fl
at
fi
le
s
t
o
a
T
e
r
a

d
at
a
d
at
a
b
a
s
e.
S
i
n
c
e
al
l
T
e
r
a
d
at
a
l
o
a
d
e
rs
d
el
i
m
it
i
n
d

i
v
i
d
u
al
r
e
c
o
r
d
s
u
si
n
g
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
s,
d
e
p
e
n
d
i
n
g
o
n
t
h
e

l
o
a
d
e
r
y
o
u
u
s
e.
Y
o
u
c
a
n
al
s
o
s
p
e
ci
f
y
e
rr
o
r,
l
o
g
,
o
r
w

o
r
k
d
at
a
b
a
s
e
n
a
m
e
s.
Y
o
u
c
a
n
o
v
e
rr
i
d
e
t
h
e
c
o
n
tr
o
l

fi
le
i
n
t
h
e
s
e
s
si
o
n
p
r
o
p
e
rt
ie
s.
W
h
e
n
y
o
u
u
s
e
T
e
r
a
d
at

a,
y
o
u
c
a
n
e
n
te
r
P
m
N
u
ll
P
a
s
s
w
d
a
s
t
h
e
d
at
a
b
a
s
e
p
a
s
s

w
o
r
d
t
o
p
r
e
v
e
n
t
t
h
e
p
a
s
s
w
o
r
d
fr
o
m
a
p
p
e
a
ri
n
g
i
n

t
h
e
c
o
n
tr
o
l
fi
le
.
I
n
st
e
a
d
,
t
h
e
I
n
te
g
r
at
i
o
n
S
e
r
v
ic
e
w

ri
te
s
a
n
e
m
p
t
y
st
ri
n
g
f
o
r
t
h
e
p
a
s
s
w
o
r
d
i
n
t
h
e
c
o
n
tr
o

l
fi
le
.
Overriding the Control File
When you edit the loader connection in a session, you can override the control file. You might want to
override the control file to change some loader properties that you cannot edit in the loader connection. For
example, you can specify the tracing option in the control file.
When you override the control file, the Workflow Manager saves the control file to the repository. The
Integration Service uses the saved control file when you run the session and for each subsequent session
run until you clear the control file attribute. If you change a target or loader connection setting after you edit
the control file, the control file does not include those changes. To include those changes, you must generate
the control file again and edit it.
If you do not override the control file, the Integration Service generates a new control file based on the
session and loader properties each time you run a session. The Integration Service generates the control file
in the output file directory. It overwrites each time you run the session.
Note: The Workflow Manager does not validate the control file syntax. Teradata verifies the control file
syntax when you run a session. If the control file is invalid, the session fails.
You can view the edited control file by opening the Control File Editor.
To override a control file:

1In
.th
e
W
or
kf
lo
w
M
an
ag
er,
op

en
th
e
se
ssi
on
pr
op
ert
ie
s.
2Cl
.ic
k
th
e
M
ap
pi
ng
ta
b
an
d
op
en
th
e
Tr
an
sf
or
m
ati
on
s
vi

e
w.
3Cl
.ic
k
th
e
Ta
rg
et
s
no
de
.
4In
.th
e
C
on
ne
cti
on
s
se
tti
ng
s,
in
th
e
Va
lu
e
fie
ld,
cli

ck
C
ha
ng
e.
5In
.th
e
C
on
tr
ol
Fi
le
C
on
te
nt
O
ve
rri
de
fie
ld,
cli
ck
O
pe
n.
T
he
C
on
tr
ol
Fi

le
E
dit
or
di
al
og
bo
x
ap
pe
ar
s.
6Cl
.ic
k
G
en
er
at
e.
T
he
W
or
kf
lo
w
M
an
ag
er
ge
ne
rat
es

th
e
co
nt
ro
l
fil
e
ba
se
d
on
th
e
se
ssi
on
an
d
lo
ad
er
pr
op
ert
ie
s.
7E
.dit
th
e
ge
ne
rat
ed
co
nt

ro
l
fil
e
an
d
cli
ck
O
K
to
sa
ve
th
e
ch
an
ge
s.

Configuring External Loading in a Session


Before you can configure external loading in a session, you must create an external loader connection in the
Workflow Manager and configure the external loader attributes.
Complete the following steps to use an external loader for a session:

1C
.on
fi
gu
re
th
e
se
ssi
on
to

wr
ite
to
fla
t
fil
e
in
st
ea
d
of
to
a
rel
ati
on
al
da
ta
ba
se.
2C
.on
fi
gu
re
th
e
fil
e
pr
op
ert
ie
s.

3Se
.le
ct
an
ex
ter
na
l
lo
ad
er
co
nn
ec
tio
n
in
th
e
se
ssi
on
pr
op
ert
ie
s.
Configuring a Session to Write to a File
To use an external loader, create the target definition in the mapping according to the target database type.
The session configures a relational target type by default. To select an external loader connection, you must
configure the session to write to a file instead of a relational target. To configure the session to write to a
file, change the writer type from relational writer to file writer. You change the writer type using the Writers
settings on the Mapping tab.
To change the writer type for the target, select the target instance and change the writer type from
Relational Writer to File Writer.

Configuring File Properties


After you configure the session to write to a file, you can set the file properties. You need to specify the
output file name and directory, and the reject file name and directory. You configure these properties in the
Properties settings on the Mapping tab. To set the file properties, select the target instance.
The following table shows the attributes in Properties settings:

Attribute
Output File Directory

Output Filename
Reject File Directory

Reject Filename

Set File Properties

Note: Do not select Merge Partitioned Files or enter a merge file name. You cannot merge partitioned output
files when you use an external loader.

Selecting an External Loader Connection


After you configure file properties, you can select the external loader connection. To select the external
loader connection, choose the connection type and the connection object. You configure connection options
in the Connections settings on the Mapping tab.

If the session contains multiple partitions, and you choose a loader that can load from multiple output files,
you can select a different connection for each partition, but each connection must be of the same type. For
example, you can select different Teradata TPump external loader connections for each partition, but you
cannot select a Teradata TPump connection for one partition and an Oracle connection for another partition.
If the session contains multiple partitions, and you choose a loader that can load from only one output file,
use round-robin partitioning to route data to a single target file. You can choose a loader for each
connection, but the Integration Service uses the connection for the first partition.
To select an external loader connection:

1
. On the Mapping tab, select the target instance in the Navigator.
2
. Select the Loader connection type.
3
. Click the Open button in the Value field.
4 Select a connection object or variable:
.
U
s
e
o
b
j
e
c
t.
S
el
e
ct
a
l
o
a
d
e
r

c
o
n
n
e
ct
i
o
n
o
b
je
ct
.
C
li
c
k
t
h
e
O
v
e
rr
i
d
e
b
u
tt
o
n
t
o
o
v

e
rr
i
d
e
c
o
n
n
e
ct
i
o
n
at
tr
i
b
u
te
s.
T
h
e
at
tr
i
b
u
te
s
y
o
u
c
a
n

o
v
e
rr
i
d
e
v
a
r
y
a
c
c
o
r
d
i
n
g
t
o
l
o
a
d
e
r
t
y
p
e.
U
s
e
c
o

n
n
e
c
ti
o
n
v
a
ri
a
b
le
.
U
s
e
t
h
e
$
L
o
a
d
e
r
C
o
n
n
e
ct
i
o
n
N

a
m
e
s
e
s
si
o
n
p
a
r
a
m
et
e
r,
a
n
d
d
e
fi
n
e
t
h
e
p
a
r
a
m
et
e
r
i

n
t
h
e
p
a
r
a
m
et
e
r
fi
le
.
O
v
e
rr
i
d
e
c
o
n
n
e
ct
i
o
n
at
tr
i
b
u
te

s
i
n
t
h
e
p
a
r
a
m
et
e
r
fi
le
.
5
. Click OK.

Troubleshooting External Loading


I am trying to set up a session to load data to an external loader, but I cannot select an external
loader connection in the session properties.
Verify that the mapping contains a relational target. When you create the session, select a file writer in the
Writers settings of the Mapping tab in the session properties. Then open the Connections settings and select
an external loader connection.

I am trying to run a session that uses TPump, but the session fails. The session log displays an
error saying that the Teradata output file name is too long.
The Integration Service uses the Teradata output file name to generate names for the TPump error and log
files and the log table name. To generate these names, the Integration Service adds a prefix of several
characters to the output file name. It adds three characters for sessions with one partition and five
characters for sessions with multiple partitions.
Teradata allows log table names of up to 30 characters. Because the Integration Service adds a prefix, if you
are running a session with a single partition, specify a target output file name with a maximum of 27

characters, including the file extension. If you are running a session with multiple partitions, specify a target
output file name with a maximum of 25 characters, including the file extension.

I tried to load data to Teradata using TPump, but the session failed. I corrected the error, but the
session still fails.
Occasionally, Teradata does not drop the log table when you rerun the session. Check the Teradata
database, and manually drop the log table if it exists. Then rerun the session.

You might also like