Lab Exercise #3 Tutorial: .Set Record Unformatted
Lab Exercise #3 Tutorial: .Set Record Unformatted
E 1) Create the Source Structure on the RDBMS by using Query Man or BTEQ based on your analysis
of your source system. This will be your staging area.
E 2) Write Fast Load Script for loading the source database in RDBMS.Sample script is given below.
.SESSIONS 1;
.ERRLIMIT 50;
DATABASE database_name;
account id char(12),
credit_card _type_cd char(l),
transaction_amt decimal(9,2),
,transaction_type _cd char(2),
trade_dt_date char (8)
);
DEFINE
account id , (char(12))
credit_card _type_cd, (char(1))
transaction - amt, (char(1l) )
transaction_type _cd, (char(2))
trade_dt_date (char (8))
,NewLine (char(2))
FILE=c:\temp\name_of_data_file.txt;
account_id,
credit_card _type_cd,
transaction _amt,
transaction_type _cd,
trade dt date
) V ALVES (
:account_id,
: credit- card_type _cd,
:transaction - amt,
: transaction _type_cd,
:trade dt date
);
END LOADING;
.LOGOFF;