Customer Portal

Generate Mulitple Target Records

Comments 5

  • Avatar
    oldforum
    0
    Comment actions Permalink
    Todd,

    I have tried to do exactly a similar thing but gave up.

    My source data has 3 fields but I want to insert a fourth one in my target

    SRC.fieldA<-->SRC.fieldB<-->SRC.fieldC
    | | |
    \/ \/ \/
    TGT.fieldA<-->TGT.fieldB<-->TGT.fieldC<-->TGT.fieldD [i.e substr(TGT.fieldC,1,11]

    I was able to accomplish this with a straight SQL statement but I was forced to load my source data into another table before I could load my target table. Very cumbersome.

    It would seem that a graph is always going to rely on static metadata i.e. "3 source ports => 3 target ports".

    My opinion is that what you want to do is not supported in Clover at this time.

    If I am wrong, someone please correct me. I will gladly admit that I am mistaken.

    Alan.
  • Avatar
    oldforum
    0
    Comment actions Permalink
    Thanks for the reply. My situation is a bit different, though. I'm always outputting the same number of fields, but I have a 1-to-many relationship between my source records and my target records. For each source record, I need to generate N number of target records. When the transform method is called the DataRecord array is of size 1. My problem is, how can I add records to this array. I've tried several different ways and always end up with no output.
  • Avatar
    oldforum
    0
    Comment actions Permalink
    If i understand well, you want stream of data with tree columns extend to data with four columns.

    This you can do via Reformat component and in gui easy define the "transformation".

    OtaSanek
  • Avatar
    oldforum
    0
    Comment actions Permalink
    Hi Todd.
    In current implementation of reformat component it's not possible increase count of incoming records. Number of allocated target records is same as number of output ports. And each record is send to appropriate output port.

    If you want resolve your issue, now you must implement your own custom component similar to reformat. It is not hard to code.

    OtaSanek
  • Avatar
    oldforum
    0
    Comment actions Permalink
    Hello Everybody !

    It seems to me that your problem would be solved by component similart to DataNormalizer (Denormalizer respectively).
    DataNormalizer outputs several records out of one input record. Denormalizer does exactly the opposite thing.

    Current version of Clover (1.8.2) does not contain such component, but we plan to add it in next release.

    You could also implement such component yourself - as it would be very similar to existing Reformat component.

    If you need this absolutely urgently, we could create such component individually for you.

    Best regards,

    David.

Please sign in to leave a comment.