sample FLOAD,MLOAD and FAST EXPORT scripts

Tools
Enthusiast

sample FLOAD,MLOAD and FAST EXPORT scripts

can anyone please provide few example scripts for
FLOAD,MLOAD and FAST EXPORT...

Thanks In Advance
3 REPLIES
Enthusiast

Re: sample FLOAD,MLOAD and FAST EXPORT scripts

Dear Reddy,

Fast Export Script:
.logtable DXWX_P57_DLWORK_DB01.logtable_EMP;
.logon tdp8/ADMIN_DXWX_P57,apple;
.begin export sessions 2;
.export outfile D:\IDQ\Outputs\emp FORMAT TEXT;
select *from DXWX_P57_PHYSICAL_DB01.emp;
.end export;
.logoff;

Fast Load Script:
SESSIONS 5;
TENACITY 5;
SLEEP 5;
ERRLIMIT 50;
.logon tdp8/ADMIN_DXWX_P57,apple;
delete from DXWX_P57_PHYSICAL_DB01.emp ALL;

DROP TABLE DXWX_P57_DLWORK_DB01.SELF_SERVICE_WT;
DROP TABLE DXWX_P57_DLWORK_DB01.SELF_SERVICE_ET;
DROP TABLE DXWX_P57_DLWORK_DB01.SELF_SERVICE_UV;

.SET RECORD VARTEXT "|";

DEFINE
Year_Week_Number (VARCHAR(15)),
Relative_Week (VARCHAR(15)),
Hierarchy_Code (VARCHAR(15)),
Hierarchy_Level (VARCHAR(15)),
Daily_Target (VARCHAR(15)),
Overnight_Target (VARCHAR(15))

FILE=D:\IDQ\Outputs\VWI0SVT_SELF_SERVICE_TARGETS;

SHOW;
BEGIN LOADING DXWX_P57_PHYSICAL_DB01.TWI0SVT_SELF_SERVICE_TARGETS ERRORFILES DXWX_P57_DLWORK_DB01.SELF_SERVICE_ET , DXWX_P57_DLWORK_DB01.SELF_SERVICE_UV
CHECKPOINT 1000;
INSERT INTO DXWX_P57_PHYSICAL_DB01.TWI0SVT_SELF_SERVICE_TARGETS VALUES(
:Year_Week_Number ,
:Relative_Week,
:Hierarchy_Code,
:Hierarchy_Level ,
:Daily_Target,
:Overnight_Target);

END LOADING;
.LOGOFF;
.QUIT;

Multi load Script:
.LOGTABLE LOGTABLEIRW;

.LOGON TDPM/LOAD_UK_UAT_U01,BANANA;
.BEGIN IMPORT MLOAD
TABLES DXWI_UAT_UK_DLWORK_DB01.TWI0IRW_IDQ_REPORT_WEEKS
WORKTABLES DXWI_UAT_UK_DLWORK_DB01.WT_IRW
ERRORTABLES DXWI_UAT_UK_DLWORK_DB01.ET_FWA
DXWI_UAT_UK_DLWORK_DB01.UV_FWA;

.LAYOUT DATAIN_LAYOUT;
.FIELD Year_Week_Number 1 INTEGER;
.FIELD Latest_Week_Ind 5 CHAR(1);

.DML LABEL INSERT_DML;
INSERT INTO DXWI_UAT_UK_DLWORK_DB01.TWI0IRW_IDQ_REPORT_WEEKS(
Year_Week_Number = :Year_Week_Number
,Latest_Week_Ind = :Latest_Week_Ind
);

.IMPORT INFILE D:\IDQ\Outputs\VWI0IRW_IDQ_REPORT_WEEKS.txt
FORMAT FASTLOAD
LAYOUT DATAIN_LAYOUT
APPLY INSERT_DML;

.END MLOAD;

.LOGOFF;

Re: sample FLOAD,MLOAD and FAST EXPORT scripts

dear satya,
I have an excel sheet. I have move the excel sheet into a database( say ms access) or teradata... can we write a MLOAD script to load the excel sheet into teradata or fexp script... can u just give a sample script for the same... please find the details below.

File name: xxx.xls
to be moved into a teradatabase or access ....

I have tried one script for the same can u provide one script for this requirement so that I can check on my script :) thanks for ur help in advance mate...
Enthusiast

Re: sample FLOAD,MLOAD and FAST EXPORT scripts

Hi try this.
save the excel file as file.csv and try.