Fastexport with MLOAD option

Tools
Enthusiast

Fastexport with MLOAD option

Hi,

Considering TD space, we planned to export the old data to dat file and when ever we required load it again. I am using below fexport script to export data with MLOAD option.

Script:

====

.logtable DB.logtable;

.logon xx/xxxxx/xxxxx;

.BEGIN EXPORT SESSIONS 20;

.EXPORT OUTFILE temp.dat

 MLSCRIPT ML_SCRIPT.mlds;

LOCKING ROW FOR ACCESS

SELECT * FROM DB.TABLE_NAME;

.END EXPORT;

.LOGOFF;

==========================

Observation:

====

> dat file data is not readable format (see sample data below).

=========================

04163311041

           ¹3   1130Ó$!

0 2916221161¹4   1130ÓL

02111211030Ï    Õ·1   1230Ó/

==========================

> Row count also not matching with table record count.

Can you please clarify for the below questions.

1. How to ensure exported dat file is correct upon successful completion of my job.

2. Can I load sample 100 records adding some condition in MLOAD script. If yes please let me know the option and where to change in the mload script.

Thank You.

6 REPLIES
Enthusiast

Re: Fastexport with MLOAD option

Please help me Fast export with MLSCRIPT option (all the details are mentioned above):

Why the O/P file is not redable format?

How to ensure the O/P file is correct?

How to load sample data from O/P file to table?

Thanks in advance.

Teradata Employee

Re: Fastexport with MLOAD option

By default, data exported from the Teradata database is output in binary format.

If you would like to know more about this, please refer to the FastExport Reference Manual.

The FastExport utility cannot output the data in delimited format.

-- SteveF
Enthusiast

Re: Fastexport with MLOAD option

Thank Steve for your reply,

Can you help me, How can I ensure that my output dat file is correct?

Teradata Employee

Re: Fastexport with MLOAD option

If the resulting data file is binary, you can do one of 2 things:

1. look at the binary data file and see if it is correct.

2. take the output file and re-load it into a new database table and check to see if it is correct.

If you are trying to load a subset of rows, please check the MultiLoad documentation for the necessary commands to achieve that.

-- SteveF
Enthusiast

Re: Fastexport with MLOAD option

Thank You, How can I say bynary data file is correct by looking? Can you tell me the process.

Thanks again..

Gnana Reddy

Teradata Employee

Re: Fastexport with MLOAD option

I am not sure this forum is the correct place to teach someone how to look at binary data to see if the data is correct.

You have to know how to interpret the values for each byte.

Obviously, if your schema is:

F1 INTEGER

F2 CHAR(10)

the first 4 bytes will represent the integer and the next 10 bytes after that will represent the value for F2.

-- SteveF