How do we process two different input streams on onTuple of Custom() Operator of IBM InfoSphere Streams?

173 views Asked by At

In Custom Operator ,I am trying to open one file which has been submitted on launch and tokenize the values from the file and compare the values with the input streams which is other file .

1

There are 1 answers

0
Samantha Chan On

You can have multiple onTuple clause in the logic of your Custom operator.

Here's an example. In here, we have two input ports Beacon_1_out0 and Beacon_2_out0. I added onTuple clause for each input port and do the processing for data coming in from each input port. The processing of each port happens independently.

() as Custom_3 = Custom(Beacon_1_out0 ; Beacon_2_out0)
        {
            logic 

            onTuple Beacon_1_out0:
            {
                printStringLn((rstring)Beacon_1_out0);
            }

            onTuple Beacon_2_out0:
            {
                printStringLn((rstring)Beacon_1_out0);
            }
        }

If you are comparing data from multiple streams, you may want to use the Join operator. The Join operator should allow you to more easily compare data from multiple input streams.