Archives of the TeradataForum
Message Posted: Wed, 07 May 2008 @ 22:33:52 GMT
Subj: | | Re: Fastexport a file then fastload the file |
|
From: | | Diehl, Robert |
I haven't followed this whole thread. But here is an example of a fastexport that creates the mload for you. You just have to customize with
databasename replacement and including a logon statement.
.logtable STG_VOL.lt_tablename;
.logon ....
.begin export
sessions 12
tenacity 4;
.export outfile /emu/stage/tcy_stage/tablename_fexp.dat
mode indicator format fastload
MLSCRIPT /zebra/loads/daily/tcy/tcy_dyn_scripts/tablename_fexp.mdl;
LOCK ROW FOR ACCESS SELECT a.*
FROM databasename.Tablename a
WHERE deal_discontinue_dt = date'9999-12-31'
;
.end export;
.logoff;
One of our DBA's (Tim Roche) created a table driven system that reads a Teradata table on the source Teradata. It then dynamically
generates the fastexport script. Part of the cool thing it does is pull either all data or related sample based on keys like account_id or
session_id. Thus all the data copied over to the other system is related IE all information for these randomly selected accounts.
Thanks,
Bob Diehl
|