Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: How to join rows in a sequencial master/detail relationship?

  1. #1

    Question How to join rows in a sequencial master/detail relationship?

    I have a file with lines like this:

    ...
    |C400|2D|MACH|DR091123456|001|
    |C405|15112014|001|000008|
    |C420|01T0700|23,25||
    |C420|F1|195,48||
    |C460|2D|00|000087|15112014|252,60|3,74|
    |C470|54445|1,000|0,000|un|0,99|060|
    |C470|66554|1,000|0,000|un|5,99|060|
    |C490|000|5102|007,00|23,25|23,25|1,62||
    |C400|2D|MACH|DR0655411|002|
    |C405|15112014|001|000045|
    |C420|01T0700|455,24||
    |C420|F1|5,43||
    |C460|2D|00|000555|15112014|52,25|1,20|
    |C470|52415|1,000|0,000|un|0,99|060|
    |C470|96854|1,000|0,000|un|5,99|060|
    |C490|000|5102|007,00|965,14|555,11|55,74||
    ...

    The hierarchy is:

    1: C400
    1.2: C405
    1.2.1: C420
    1.2.2: C460
    1.2.2.1: C470
    1.2.2.2: C490


    Well, C490 and C470 are details of the C460;
    C460 and C420 are details of the C405; and
    C405 is a detail of the C400.


    But I don't have any ID in detail line linking it to its master. Just the file sequence. I mean, starting with one C400, next C405 is detail of previous C400. Next C420 and C460 are details of previous C405. And so on.


    Here's my question:


    Is there a way to merge this information and put into a database?

    tks.

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

    Default

    Your question is actually very similar to this thread
    It's just that your "New Record" flag is "C400"

Tags for this Thread

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.