Customer Portal

Identifying error in input file

Comments 5

  • Avatar
    avackova
    0
    Comment actions Permalink
    Hello,
    default dataPolicy parameter on each reader is set to "strict" value. It means that after first BadDataFormatException graph execution is aborted. You can set foregoing parameter to "controlled" (parseable records are sent to output port, unparseable records are logged) or "lenient" (attempts to set incorrect data to default values while processing continues).
  • Avatar
    acq
    0
    Comment actions Permalink
    Hello,

    is it possible, by means of actual clover standard components, to send to a log file any record unparseable by delimited datareader?
    Actually, setting a controlled data policy would print errors encountered, not unparseable records, is it right?

    Thanks for any suggestion.
  • Avatar
    crfpkr
    0
    Comment actions Permalink
    I did this by reading the input in all string format and then passing it to Reformat component where using java class, i parse the input and attach a flag to each record as true or false. Then i pass on this to a partition component where i seperate the record in to valid or invalid based on the flag i added in reformat. Works great.,,, like this you can parse and validate your data as many ways as you wish cuz you do it in java.. hope this helps
  • Avatar
    acq
    0
    Comment actions Permalink
    Thank you for your answer. I did exactly the same, but though it does work, the resulting code is not as scalable as metadata approach for a huge number of different validation patterns.
    Regards,
  • Avatar
    avackova
    0
    Comment actions Permalink
    If you use Universal Data Reader you can save to file more info about unparseable records.

Please sign in to leave a comment.