Customer Portal

Convert custom Node from old CloverETL to new one

Comments 4

  • Avatar
    avackova
    0
    Comment actions Permalink
    Hello Ashish,
    your component must process all records on all input ports. Eg. if you join records from two ports, you must read slave records, even if there is no more records on master port. This check was introduced in 2.8 version. In older version, CloverETL Engine hadn't cared about such records.
  • Avatar
    ashishkshirsagar
    0
    Comment actions Permalink
    Hello ,

    In the old custom component, there is conditional processing of the records from the input ports i.e. it checks for a condition if it is true it process the records. As it is mandatory to read all the records from all the input ports in the newer version I just added an else part of the condition where I just read records but dont process them to make the old custom component work ...

    is there any way I could skip reading the records when not required or what would be a nice way and easy to handle this ?

    Thanks,
    Ashish
  • Avatar
    avackova
    0
    Comment actions Permalink
    Hello Ashish,
    your approach is proper (MergeJoin component does it in the same way).
  • Avatar
    ashishkshirsagar
    0
    Comment actions Permalink
    One more Question

    Does the DBOuptutTable component in the old version check for the unique constraint violation while inserting records ?

    I am reading all the records like this


    while ((inRecord1 != null)&& runIt)
    {
    inRecord1 = readRecord(READ_FROM_PORT, inRecord1);

    if (inRecord1 != null){
    writeRecords(Output port);
    }

    SynchronizeUtils.cloverYield();
    }

    /* Added this part to read records and do nothing */
    /* This work but is this correct ? */
    while ((inRecord2 != null || inRecord3 != null)&& runIt)
    {
    inRecord2 = readRecord(1, inRecord2);
    inRecord3 = readRecord(2, inRecord3);

    }



    while I am using this code .. it gives me unique constraint violation ...

    I ran the old custom transformation file with old jar and it worked fine .. it did not gave the unique constraint violation ..

    I only added the above "reading all records part" to this old custom transformation file and did no other code change .. but it gives me unique constraint violation error... so I was wondering does it have something to do with older version of DBOutputTable .

    Thanks
    Ashish

Please sign in to leave a comment.