Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Error generation when length of field is less then expected

  1. #1
    Join Date
    Jun 2007
    Posts
    138

    Default Error generation when length of field is less then expected

    Can I have length based valdiation when i m loading the file?

    The file coming to input is CSV.
    I have two requirements..


    1)I have specification for the length of each field.If input doenst meet cretiria then its an error.

    I want to store these errors,for each field with the information where they occured.

    2) One more validation I want to do is I have some user defined business logic to valdiate each field of input.May be I can use a regex with javascript or I can call java method from some loadClass utilty which interacts java method.If the field doensnt meet that business validation then it should be an error (just like format inconsistency-null input).

    Finally i want to store all these errors with that errorneous field & row into a file...

    Can u tell how can I do that?

    Thanx a lot..
    Regards,
    kedar.mehta@tcs.com ,
    Tata consultancies Ltd

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    1) probably with javascript step only. Setting e.g. an error field and then later using filter step to either route the data to the 'correct path' or the 'error path'

    2) Variation of 1)

    Regards,
    Sven

  3. #3
    Join Date
    Jun 2007
    Posts
    138

    Default regex based error management

    Can I put Regex into
    text file input-->field-->format-->( some REGEX here )
    ????

    Here,Wat I want is,if the field coming in,from loaded file is not proper(as per Regex defined by me) Kettle would consider it as error.

    I have unselected ignore error check box in fiel input,N have named
    error field
    error count
    error description.

    error count shows number of error into a row.

    m using kettle transformation 2.5.1 .
    Last edited by kedar mehta; 01-10-2008 at 10:03 AM.
    Regards,
    kedar.mehta@tcs.com ,
    Tata consultancies Ltd

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

  5. #5
    Join Date
    Jun 2007
    Posts
    138

    Default older version

    Thanx Boss..

    3.0.1 is really good one..

    But It wont help me out ,as we are using Kettle 2.5.1 ..

    Regards,
    kedar.mehta@tcs.com ,
    Tata consultancies Ltd

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.