Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: About Select Values Step

  1. #1
    Join Date
    Dec 2006
    Posts
    106

    Default About Select Values Step

    Dear all:

    I have a question about Meta-data tab of Select Values Step.
    We know that it allows us to change the meta-data but not the data itself.
    If we wanna truncate a field, changing its length can not be used for that.
    The function of changing length in Select Values Step seems to be unmeaningful.
    Im so curious and want to know what situaltion does changing length probably can be applied in??

    thx for replying me!
    have a good day!

    Regards,
    Jeff
    Last edited by xihan; 08-11-2009 at 04:46 AM.

  2. #2

    Default Hope this helps

    Hi Jeff,

    The only thing that I've been using select values is to rename fields.

    If I understand you correctly, I would suggest the "cut strings" step. I have been using the "modified javascript" step to make new fields as
    I generally needed more complex logic to manipulate my fields.

    Then I would use the select values to rename the field (overwrite the original field).

    Not sure if this is the correct way, but it works consistently, which wasn't always true for changing the value/size directly in the "modified javascript".

    Regards
    Paul

  3. #3
    Join Date
    Dec 2006
    Posts
    106

    Default

    Quote Originally Posted by PollieXmas View Post
    Hi Jeff,

    The only thing that I've been using select values is to rename fields.

    If I understand you correctly, I would suggest the "cut strings" step. I have been using the "modified javascript" step to make new fields as
    I generally needed more complex logic to manipulate my fields.

    Then I would use the select values to rename the field (overwrite the original field).

    Not sure if this is the correct way, but it works consistently, which wasn't always true for changing the value/size directly in the "modified javascript".

    Regards
    Paul
    Hi.. Paul..

    U'r right! The way u supply really can do it if i wanna truncate a field with a specific length.
    But im so curious that wut the situation can changing the length in "Select Values" Step be applied in?

    anyway.. thx for sharing nice experience to me!!
    have a good day!!

    Regards,
    Jeff

  4. #4
    Join Date
    Jul 2009
    Posts
    24

    Default Metadata Changes

    We use the Select values a lot to change Metadata when data is converging in a stream from seperate source. The type conversion can save a lot of time versus trying to manually write code. As for the length the issue of truncation is not handled but we often recieve fixed length files that have very wide columns to hold narrow data, we can correct the length in the stream with a select values. We also use the length option when we are passing data through the stream and adding formatting in the case we need to have some special characters applied to a string in order to have it stored as a string with the proper format. (ie item_code stored in old system as "A12C3456" (Length=8) may need to be stored as "A-12-C-3456" (Length=11). Overall we find it to be a very usefull step and see it in a majority of our more complex transformations.

    Hope this helps,
    Jeff

  5. #5
    DEinspanjer Guest

    Default

    The only places that the string length is really useful is when using it to create SQL DDL statements, and when outputting to a text file that is using fixed with output or padded fields.

  6. #6
    Join Date
    Dec 2006
    Posts
    106

    Default

    To Jeff and DEinspanjer:

    thx for ur share, both of U
    i think i can figure out more than before

    All the best!!

    Regards,
    Jeff

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.