Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Why exception is not handle in error step?

  1. #1
    Join Date
    May 2013
    Posts
    4

    Default Why exception is not handle in error step?

    I am converting a string to number in CSV input step and trying to handle the rubish in a Data Validator step.
    I defined the error handling step as an Excel output but the Data Validator throws a KettleValueException: couldnt convert String to Number when I run the transformation.
    I just want to filter this problematics rows. I faced this same behavior in others transformations.
    In this case, the Data Validator step just should sent the errors to the error step and continue the transformation??
    Or some types of exceptions arent treated this way?

  2. #2

    Default

    I have the same issue. Is there another way to think about handing bad data in a CSV?

  3. #3
    Join Date
    Nov 2009
    Posts
    688

    Default

    You can use the "Select values" step. Change the fields from string to number and send the error records to a seperate step.

    Name:  error handling.jpg
Views: 40
Size:  33.3 KB

  4. #4

    Default

    Thank you for the response johanhammink. It is helpful to know how PDI is intended to be used. I appreciate the effort. As it turns out, there are exceptions known as KettleValueExceptions that are considered to be so severe that even with the presence of an Error Hop, execution is halted. In this case, I believe it is due to new line characters (/n) embedded in the text. When the Select Values step attempts to make a datatype conversion the KettleValueException is thrown. I was able to work around the issue by creating a User Defined Java Class step to replace the Select Value step:

    Name:  JavaSnippet.jpg
Views: 28
Size:  21.2 KB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.