Customer Portal

REFORMAT Component Throwing Null Values in OutPut

Comments 2

  • Avatar
    julrych
    0
    Comment actions Permalink
    Hi Naveen,

    the reason you are not getting any data on output is that you are missing a return statement in the transform() method. The value returned from transform() specifies to which output port should the data be sent. The
    return 0;
    will cause CloverETL engine to push the output data to output port $0.

    By the way, it seems to me that you could implement the same functionality directly in CTL2 which should make things easier to read. I don't think that you need java.
  • Avatar
    avackova
    0
    Comment actions Permalink
    Hello Naveen,
    you don't set any values to the output records if the condition matches. If you want just to copy the values from input to output, use defaultTransform(DataRecord[] inputRecords, DataRecord[] outputRecords) method:
    		if (OBJECTNAME.contains(".aspx") || OBJECTNAME.contains(".css")
    || OBJECTNAME.contains(".jpeg") || OBJECTNAME.contains(".png")
    || OBJECTNAME.contains(".JPG") || OBJECTNAME.contains(".gif")) {

    defaultTransform(source, target);

    System.out.println("No Value");
    }

Please sign in to leave a comment.