Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Transform invalid date format from CSV file

  1. #1
    Join Date
    Nov 2015
    Posts
    8

    Default Transform invalid date format from CSV file

    Hi,

    I need to load a simple CSV file which contains a DATE field in dd/MM/yyyy format.
    Unfortunately one or more rows contains invalid format, e.g. "N/A".
    I want to transform this "N/A" value with a custom date: 01/01/1900 for example.

    What are the best transformations or steps for this case?

    Thanks,
    [bayu]

  2. #2
    Join Date
    Nov 2015
    Posts
    2

    Default

    Hello,

    Never Mind,

    You can easily overcome this issue using "Replace in String" and "Select Value" Steps.

    Please find screenshot and .ktr file as I attached

    Regards,Name:  csv.jpg
Views: 54
Size:  14.1 KB

  3. #3
    Join Date
    Nov 2015
    Posts
    8

    Default

    Hi Manju,

    Thanks for the solution.
    BTW, it might you forgot the attachment

    Regards,

  4. #4
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    A more streamlined solution would be:

    Name:  TFI.jpg
Views: 51
Size:  12.1 KB
    So long, and thanks for all the fish.

  5. #5
    Join Date
    Nov 2015
    Posts
    8

    Default

    Hi Marabu, thanks for other good solution...

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.