How to fastlaod a file which is actually fastexported

Tools

How to fastlaod a file which is actually fastexported

Hello

I fast exported as following

.logtable retail.restartlog1_fxp;

.logon localtd/dbc,dbc;

.begin export sessions 4;

.export outfile C:\Users\test\Documents\retail14.txt;

sel * from retail.area_3;

.end export;

.logoff;

and the output it gave me is

p  KENYA L yA0jNSxmS25NRiCy1B6yhSL4NLMROQ3kLyAPx43wil27kN1QmPLmPw7ywh2kyj2iSBwSjx26zClx
j
JORDAN  F P53ljBPS 2PM7g6MwwywM47mCji1QkB4RNghzxB56mC5QiwOn2QlM3ikz6wN5NlM4N7C7B
‰  SAUDI ARABIA  e kC7 nNNz3ON73Az03O S13CklRh47jlxw5 5k6LClx52LQCQS6P1B3k1xPgMnk3PmMy7 l1nlBBBwBk0x6MACxOiigLO5mm5mO7N
‹  UNITED KINGDOM  g POnSl70NBLPgh2B04P3m4j3lO0R2525Q7BCSBgwAQ712w0RAPxhMkkjhQCORLQihjCBO3gSiN5gx4mjnLiCx6w2MzR jwgLwP7kRxw4
?  PERU  l 35h63 yS7gjRh22iyBlhy5wjLMQnln74k0j5O ygx1miQgA66hyhP3740PQOgRkwhy1i3LSwzjB 3yjh0QnyMMN A7Qn 6NOC2jg65QRLAgS
W  RUSSIA  3 63w6MRN 2yANOMC0hjAn4RC7Qy6jhln37 2RggAM3x5S3i1On57
h JAPAN  D y PiRn6O4Rny0P6Q0NhM5N26AhghiClRQlP QNQx205B3im7zPBOSSm5MAl3BjMLiM3P
K  ARGENTINA  ' zQn3Okwz1wLn7PLS3OhCgn56kP5PyRikgi1B7lL
H  FRANCE  $ 3mjmizl S 3L3k2hNNhNlP4w370xRxyN15wn
X  EGYPT  4 l1im5126 Cxj NMQmLxOikni02j2m3Ah4yNR1QQiL507j2QSlyN
?  MOROCCO k 7mC2hnARnj21nwllAOhR2nwRmgz22AkP6xj3iQiPNB0PjxBMzS3g 4y0L4Alx1gNCAP2kjQMBR2xwiiSNLgCMQx74RmhMy4OONhPCNQQ 3y
–  BRAZIL  r gLmS0nACAmnBCj2klki7RCPNgPxnCOjNg4k OiAg57COSOm1NwCnOyLx40R SC y20gPPAkNk5hxRhR5OmgS1iPQQzNAxPL30n67OgyC l617Sh4LS
W  ETHIOPIA 3 NS7n LSOP Oz5n1AlB2S02nN0lMh4SBxP iRhBO 047R26 2BlM
z  CHINA  V 2hg1nh2OCS1nzh2mmAkP w4hyPg2SLxlAO4g0mCCjxBhBnwMi52M575SPzO07ggjN32B5SyhNOR0Ah4C1Qz 3P
R  CANADA  . 4yMO AhnQ5Lh wzQAM662Aw1ByCl7CxmzRwNR5nAlO4 x
N  VIETNAM  * wzw7lPgRmnCM5i2x7zy1hO0P75Pwk5z4Sl627l7LlN
I  GERMANY  % z nOP4RkwO CmzBB 516mAg lByw4OM3QyNPA
ƒ
IRAN  _ h532g43BgShyO50OgSB2hO6jxQn3Q1w4NmPL4hg0mmPOC5SSLg6miR7m6B317 lz4jQMwPRyRn1jiRPmi mk0 yj0C5M5xi
z  MOZAMBIQUE V LB6SkSOmkznRLS4z5P2BOmC23RnA6h7mn0gPAAN7nkxy6jO0k3w3R32R6A1ASk0LMyngO36jCL1gl5wQw4AMPC
O ALGERIA + 2Cxhl7 L1iwk6hMh300izngN32CPwCikyLk6khMzSRA
|  ROMANIA  X n7l0B41Qw5 mmS0QmQ3wNRPL62kiQg0RmQ6C4QR67iyzw0Mz5yMBLwSlP0lP7x4S7OR637nj1jig giN11wm265
Z  UNITED STATES  6 QQ41AxzBSQACRA1wCLyONCi5yzCyljQR144lnNLm2 Q7PRyk BRzP
”  INDIA  p MNlR5RCiRMj1l11wjN7Myn M1lylNlMmBQl7PL4C kkxQkgPQ7i3w6B67R2QkOO40xl4Q2iw76jRL7ilhR5Q 0xC7RRm5iQ2NAx2LiBm3QiO27j
i INDONESIA  E SjPmQO71Lj 7ABj6MxlAQk3nLwi73BPxzCwjzMn4zlLzgg6nnz0j0w zxC66gP6ykRPMg
| IRAQ  X 6N gw7Mg4xPiAwjQS6iROwPgjz7jkPll5RkRxgCClzQinjMkOx3PyxOyzyN6nL3BzlyNM0OwxOwxBLO0lkkRMyBO

So Now when i fast loaded the same file to retail.area_5 wit the following commands

LOGON localtd/dbc,dbc;

Set Record Vartext " ";
BEGIN LOADING RETAIL.AREA_5
ERRORFILES RETAIL.AREA_5_ERR1,
RETAIL.AREA_5_ERR2
CHECKPOINT 10;
DEFINE N_NATIONKEY (VARCHAR(152)),
N_NAME (VARCHAR(125)),
N_REGIONKEY (VARCHAR(152)),
N_COMMENT (VARCHAR(152))
FILE=C:\Users\test\Documents\retail14.txt;
INSERT INTO RETAIL.AREA_5 (
N_NATIONKEY
,N_NAME
,N_REGIONKEY
,N_COMMENT

) VALUES (
:N_NATIONKEY
,:N_NAME
,:N_REGIONKEY
,:N_COMMENT

);
END LOADING;
LOGOFF;

it gave me this error

**** 18:42:04 Number of recs/msg: 109
**** 18:42:04 Starting to send to RDBMS with record 1
**** 18:42:04 Not enough fields in vartext data record number: 1
===================================================================
= =
= Logoff/Disconnect =
= =
===================================================================

**** 18:42:04 Logging off all sessions
**** 18:42:05 Total processor time used = '0.483603 Seconds'
. Start : Wed Jan 28 18:42:03 2009
. End : Wed Jan 28 18:42:05 2009
. Highest return code encountered = '12'.
**** 18:42:05 FastLoad Paused

so please help me
1 REPLY
Junior Contributor

Re: How to fastlaod a file which is actually fastexported

Hi Satish,
if you do a FastExport without any FORMAT then it's exporting in internal format (FORMAT FASTLOAD) including NULL indicators.

To load that format using FastLoad you have to use SET RECORD FORMATTED or no SET RECORD at all, because this is default in FastLoad.
And you have to add the INDICATORS option in the BEGIN LOADING section.
Finally the datatypes in DEFINE must match exactly the original column's datatype.

Dieter