CAN I WRITE ERRORED RECORDS INTO A FILE IN MLOAD?
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


CAN I WRITE ERRORED RECORDS INTO A FILE IN... Expand / Collapse
Author
Message
Posted 9/4/2009 9:56:05 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 11/6/2009 11:56:30 PM
Posts: 19, Visits: 37
Hi ALL,

While loading data from flat file to Teradata table using MLOAD,few records has bad data.Due to these records MLOAD got failed and this data hasn't been captured in ET tables.
So I have used "DISPLAY ERRORS NOSTOP" command to make sure that MLOAD get completes without fail.But I want to write such bad records into a file for furthur investigation.

Can someone help me in acheiving this task please?



Learn And Share...

URS

Ravindra Red

Post #16763
Posted 9/10/2009 2:38:19 PM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 11/9/2009 3:27:04 PM
Posts: 38, Visits: 46
The first item of importance is to not that the DISPLAY ERRORS and NOSTOP options only work
with VARTEXT records. It will not work with the binary formats.

Next, the DISPLAY ERRORS option will indicate to MultiLoad that the rows in error should be
written to the standard error output (stderr). You can easily redirect stderr to any file of your
choice on the MultiLoad command line.

Post #16803
Posted 9/16/2009 5:38:55 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 11/6/2009 11:56:30 PM
Posts: 19, Visits: 37
Thank You Very Much Steve for the reply...

Steve..

I tried running the below script through Informatica

mload error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.out

I though that only errrored records information will be written onto error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.out

But entire loader log has been written onto this file.

Please find my import section of the MLOAD script as below...

.Import Infile '/Informatica/TgtFiles/teis_crmc_pers_nm_cust.out'
Layout InputFileLayoutPERS
Format Vartext '|~,|' DISPLAY ERRORS NOSTOP
Apply tagDMLPERS
;

Could you please let me know how can I write these errored records into a file instead of writing onto the standard output...

Where can I make the change in the script to accomplish this...

Thanks In Advance..


Learn And Share...

URS

Ravindra Red

Post #16843
Posted 9/16/2009 5:42:21 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 11/6/2009 11:56:30 PM
Posts: 19, Visits: 37
Thank You Very Much Steve for the reply...

Steve..

I tried running the below script through Informatica

mload /Informatica/TgtFiles/error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.out


I though that, only errrored records information will be written onto error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.out

But entire loader log has been written onto this file.

Please find my import section of the MLOAD script as below...

.Import Infile '/Informatica/TgtFiles/teis_crmc_pers_nm_cust.out'
Layout InputFileLayoutPERS
Format Vartext '|~,|' DISPLAY ERRORS NOSTOP
Apply tagDMLPERS
;

Could you please let me know how can I write these errored records into a file instead of writing onto the standard output...

Where can I make the change in the script to accomplish this...

Thanks In Advance..



Learn And Share...

URS

Ravindra Red

Post #16844
Posted 9/16/2009 7:22:48 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 11/6/2009 11:56:30 PM
Posts: 19, Visits: 37
I got the solution to write the error messages to a file..

But what I am looking for is...

Can I write the errored records into a file?

Thanks In Advance


Learn And Share...

URS

Ravindra Red

Post #16846
Posted 9/16/2009 9:00:06 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Yesterday @ 3:55:54 AM
Posts: 111, Visits: 263
DISPLAY ERRORS writes the error records to syserr.
Your command redirected sysout, not syserr.

Use:

mload 2>/Informatica/TgtFiles/error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.out

That should write sysout to its normal destination, but will write ALL the errors - error messages and error records to syserr.
You should be able to sed the file to redirect/ remove error messages if you need to.

Post #16848
Posted 9/16/2009 9:40:35 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 11/6/2009 11:56:30 PM
Posts: 19, Visits: 37
Thanks Jimm..

It really helped me a lot!!!!



Learn And Share...

URS

Ravindra Red

Post #16850
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 3:06pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.094. 9 queries. Compression Disabled.