Teradata loading utilities
The article contains comparison and main features of the data loading tools provided by Teradata. The tutorial illustrates main features of Teradata Multiload , FastLoad and TPump (Parallel Data Pump) and provides sample real-life uses of those tools.
Fast Load
Multi Load
TPump
FastLoad(script)
===========================
The following script attached below will load a sample fixed-length columns extract into a Teradata database using FastLoad.
SESSIONS 4;
ERRLIMIT 25;
logon tdpid/username,password;
create table gg_cli (
wh_cust_no integer not null,
cust_name varchar(200),
bal_amt decimal(15,3) format �ZZZ,ZZ9.999�
)
unique primary index( wh_cust_no ) ;
SET RECORD UNFORMATTED;
define
wh_cust_no(char(10)), delim1(char(1)),
cust_name(char(200)), delim2(char(1)),
bal_amt(char(18)), delim3(char(1))
newlinechar(char(1))
file=insert.input;
SHOW;
BEGIN LOADING gg_cli errorfiles error_1, error_2;
insert into gg_cli (
:wh_cust_no,
:cust_name,
:bal_amt
);
END LOADING;
logoff;
MultiLoad(script)
===========================
The following script attached below will load a sample fixed-length columns extract into a Teradata database using MultiLoad. Use the following command to run load the ggclients.mload file using Teradata FastLoad script:
.logtable inslogtable;
.logon tdpid/username,password;
create table gg_cli (
wh_cust_no integer not null,
cust_name varchar(200),
bal_amt decimal(15,3) format �ZZZ,ZZ9.999�
)
unique primary index( wh_cust_no ) ;
.BEGIN IMPORT MLOAD tables gg_cli;
.layout ggclilayout;
.field wh_cust_no 1 char(10);
.field cust_name 12 char(200);
.field bal_amt 213 char(18);
.dml label insertclidml;
insert into gg_cli.*;
.import infile insert.input
format text
layout ggclilayout
apply insertclidml;
.END MLOAD;
.logoff;
TPump(script)
===========================
The sample script attached below loads a sample fixed-length columns extract into a Teradata database using Parallel Data Pump - Teradata TPump.
.logtable tpumplogtable;
.logon tdpid/username,password;
.BEGIN LOAD SESSION 4;
.layout ggclilayout;
.field wh_cust_no 1 char(10);
.field cust_name 12 char(200);
.field bal_amt 213 char(18);
.dml label insertclidml;
insert into gg_cli.*;
.IMPORT INFILE insert.input
layout ggclilayout
apply insertclidml;
.END LOAD;
.logoff;
No comments:
Post a Comment