Lab Exercise #3 Tutorial

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; .LOGON server - name/usemame, password;

DATABASE database_name;

DROP TABLE your_table; DROP TABLE your_table _errorl; DROP TABLE your_table _error2;

CREATE TABLE your_table ( 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; BEGIN LOADING your_table ERRORFILES your_table_ERRORI, your_table_ERROR2 CHECKPOINT 10000; INSERT INTO your_table ( account_id, credit_card _type_cd,
transaction _amt, transaction_type _cd,

trade dt date

:account_id, : credit- card_type _cd, :transaction - amt, : transaction _type_cd, :trade dt date ); END LOADING; .LOGOFF;

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.