Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Splitting out fields

  1. #1

    Default Splitting out fields

    Bit of a stupid question I guess but I've got the following....
    0|Not Defined
    2|On Hold
    3|Tender
    4|Award
    5|On Site
    6|Archived

    in a field and I want to split field to rows, using the field to rows step and | as the delimiter sorta works but I need to keep the number associated with the record, can you use carriage return as the delimiter or is there a better way of going about this?

    Cheers

    Tom
    This is a signature.... everyone gets it.

    Join the Unofficial Pentaho IRC channel on freenode.
    Server: chat.freenode.net Channel: ##pentaho

    Please try and make an effort and search the wiki and forums before posting!
    Checkout the Saiku, the future of Open Source Interactive OLAP(http://analytical-labs.com)

    http://mattlittle.files.wordpress.co...-bananaman.jpg

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

    Default

    The easiest would be a snippet of javascript probably.

    Regards,
    Sven

  3. #3

    Default

    Pfft you all suck.... who writes this software??!?!?

    Fair enough, thanks sven

    Tom
    This is a signature.... everyone gets it.

    Join the Unofficial Pentaho IRC channel on freenode.
    Server: chat.freenode.net Channel: ##pentaho

    Please try and make an effort and search the wiki and forums before posting!
    Checkout the Saiku, the future of Open Source Interactive OLAP(http://analytical-labs.com)

    http://mattlittle.files.wordpress.co...-bananaman.jpg

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

    Default

    I don't think you need JavaScript since the split field to rows step uses a regular expression.
    Adding a sequence number to the rows beforehand would help you keep the rows together to do whatever you want with it.

  5. #5
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Maybe I'm reading this wrong, but do you want to do:
    [Incoming Data]
    [0|Not Defined]
    [2|On Hold]
    [3|Tender]
    [4|Award]
    [5|On Site]
    [6|Archived]

    to
    [code][Means]
    [0][Not Defined]
    [2][On Hold]
    [3][Tender]
    [4][Award]
    [5][On Site]
    [6][Archived]


    --------------
    Just noticed who the OP was. This is likely a REALLY stupid question. But I'm going to leave it here, just in case. Who knows - maybe it is this simple.
    Last edited by gutlez; 11-10-2008 at 09:39 PM.

  6. #6

    Default

    Dont' worry the OP is stupid

    I forgot to mention that is all one large field thats why I wanted to split on carriage return
    This is a signature.... everyone gets it.

    Join the Unofficial Pentaho IRC channel on freenode.
    Server: chat.freenode.net Channel: ##pentaho

    Please try and make an effort and search the wiki and forums before posting!
    Checkout the Saiku, the future of Open Source Interactive OLAP(http://analytical-labs.com)

    http://mattlittle.files.wordpress.co...-bananaman.jpg

  7. #7

    Default

    never mind the example on the migrating javascript page was exactly what I needed

    Thanks
    This is a signature.... everyone gets it.

    Join the Unofficial Pentaho IRC channel on freenode.
    Server: chat.freenode.net Channel: ##pentaho

    Please try and make an effort and search the wiki and forums before posting!
    Checkout the Saiku, the future of Open Source Interactive OLAP(http://analytical-labs.com)

    http://mattlittle.files.wordpress.co...-bananaman.jpg

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.