I wish to value the "position", which involves (inter alia) multiplying P_BaseAmount either by M_Bid (if P_BaseAmount > 0) or by M_Offer.
For now I will fork the stream, and use separate KSQL stream processing statements to encode the two variants (one to select P_BaseAmount * M_Bid and one to select P_BaseAmount * M_Offer) and others to re-join the streams.
Perhaps that is the "correct" streams-based approach, but I'd appreciate the option to code it instead as a single stream processor with an IF function.
I have the following stream which joins "position" with "market" information:
I wish to value the "position", which involves (inter alia) multiplying
P_BaseAmount
either byM_Bid
(if P_BaseAmount > 0) or byM_Offer
.For now I will fork the stream, and use separate KSQL stream processing statements to encode the two variants (one to select
P_BaseAmount * M_Bid
and one to selectP_BaseAmount * M_Offer
) and others to re-join the streams.Perhaps that is the "correct" streams-based approach, but I'd appreciate the option to code it instead as a single stream processor with an IF function.