Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Filter an input file on the length of a field

  1. #1
    Join Date
    Dec 2015
    Posts
    4

    Default Filter an input file on the length of a field

    Hello all,

    I'm fairly new to PDI. Fairly new? I made a couple of jobs and transformations, but all of them at a basic level.
    Now I received a "simple" question from my end user. He has a CSV file with in one of the columns numbers with a length of 4 and with a length of 5.
    He only needs the length of 4, so I want to filter the CSV in PDI and use the rows which have 4 length in the column.

    I have tried a lot of things, but non has given me the result I need.

    Can somebody help me with this one? It can't be hard, at least I think

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

    Default

    Why not use Filter-Rows? If it's a numeric String you can use Calculator to return the length of the string, if it's an Integer you are interested in those between 1000 and 9999.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Dec 2015
    Posts
    4

    Default

    Quote Originally Posted by marabu View Post
    Why not use Filter-Rows? If it's a numeric String you can use Calculator to return the length of the string, if it's an Integer you are interested in those between 1000 and 9999.
    I never thought of it like that, I can use 0000 to 9999. I'm going to try that, thanks!

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.