Detect errors from Informatica Log via ETL

I am writing data in flat files using Informatica, with a Transaction Control Transformation to split the output in several files.

I need to know if a particular file fails to be created and to write down in a log table this incidence. I have forced some errors (v.g. forcing a non-existent directory in the filename.) and then I have attempted to capture the error.

  1. Defining Error Log Type (Config Object tab) in the session properties does not show any relevant exception.
  2. Checking Write Backward Compatible Session Log File (Properties tab) in the session properties does work.

However, the backward compatible log file is not easy to decrypt. I could recognize the error I forced.

WRITER_1_*_1> WRT_8004 Writer initialization failed [Error opening session output file [/path-to-file/fake-path/filename.csv] [error=No such file or directory]]. Writer terminating.
WRITER_1_*_1> CMN_1761 Timestamp Event: [Mon May 27 18:20:28 2019]
WRITER_1_*_1> WRT_8064 Error opening session output file [/path-to-file/fake-path/filename.csv] [errno=2] [error=No such file or directory]
WRITER_1_*_1> WRT_8333 Rolling back all the targets due to fatal session error.
WRITER_1_*_1> CMN_1761 Timestamp Event: [Mon May 27 18:20:28 2019]
WRITER_1_*_1> WRT_8081 Writer run terminated. [Error in loading data to target table [MAPPING_CSV]]

For this specific error I could capture some part of the strings above, however I would like to know if there is some general way to recognize an error, and not get confused with false positives such as

MAPPING> TM_6307 DTM error log disabled. 

or

DBG_21216 Finished transformations for Source Qualifier [LKPTRANS{{DSQ}}]. Total errors [0]

I plan to capture error messages, decode them and then write them in a database table.

Thank you in advance.

Upvotes: 1

Views: 652

Answers (1)

Daniel Machet
Daniel Machet

Reputation: 630

If you choose to log errors to table instead of file, it will include relevant field values at the time the error occurred. I'd suggest using filename port instead of transaction control and then the filename port will hold the name of the error file the record failed with.

Upvotes: 0

Related Questions