Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: different fields from an “internal” stream

  1. #1

    Default different fields from an “internal” stream

    Hello,

    Haw can I define different fields like by reading a file with “Text file input” step, but from an “internal” stream with one “big”- field??

    Thank you in advice!!


    My details:

    I have to read records from a text file into a table in mySQL.
    My problem is, in the file they are different record types.

    The different records are similar, but with different length and with different number of fields (some of the fields are not present in an each record). So I have identical fields on a different position….
    In my target table in mySQL the not existing fields, depending on the certain record, can become the value “blank”.

    I can easy recognize the record type by means of the first field whit the field name: “Requestname” (is in each record present; key field).

    I try to solve like that:

    So my first step is “Text file input”. Here I defined only 2 fields: “RequestName” and “All_fields_after_the_first_one”

    Then I distribute the stream after the first step (“Text file input”) into “Filter rows” Steps (one Filter rows Step for a one certain “Requestname”- value).

    So after each “Filter rows”- step I have a stream with records, with are identical. Now I have to divide the field “All_fields_after_the_first_one” into many (sub) fields, depending on the position.

    Haw can I define different fields like by reading a file with “Text file input” step, but from an “internal” stream with one “big”- field??

    Thank you in advice!!

  2. #2
    DEinspanjer Guest

    Default

    Someone asked a question that strikes me as somewhat similar. Take a look at this thread and the example code attached to it and see if it gives you any ideas:
    http://forums.pentaho.org/showthread.php?t=63924

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.