Home › Forums › KX Academy › Fundamentals Capstone 2.2 › Re: Fundamentals Capstone 2.2
-
Hi ,
I think one thing that could be helpful is using conditional evaluation Cond | Reference | kdb+ and q documentation – Kdb+ and q documentation (kx.com)
So you’ve got:
extractBrokerId: {[exchangeMessage] parts: "-" vs exchangeMessage;
Which is correct.
If we take a look at our messages table we can see that if the exchange message begins with CME – the brokerId is going to be at the end.
If it begins with ISE – the brokerId is going to be in the middle.
So using the conditional, we can basically say if the exchange message is like “CME*” then use the last part else use the middle part.
Let me know if this helps,
Megan