cancel
Showing results for 
Search instead for 
Did you mean: 

Capstone 2.3

bldulam1
New Contributor

I am having trouble with Exercise 2.3 in the capstone project. I tried making both trade_id and exch_message as strings, but my solution is still incorrect.

 

here is the meta messages:

c | t f a

------------| -----
trade_id | C
exch_message| C
broker_id | j

 

This is my solution:
messages: update trade_id: string trade_id, exch_message, broker_id: extractBrokerId each exch_message from messages

extractBrokerId: {[exchMsg]
temp: "-" vs exchMsg;
msg: temp[0];
res: temp[2];
if[msg~"ISE"; res:temp[1]];
"J"$res
}

 

1 ACCEPTED SOLUTION

Michaela
Community Manager Community Manager
Community Manager

Hi @bldulam1 - you are very close! I had a go running your solution and see a different meta than what you have shared. 

Michaela_0-1682439707853.png

Michaela_1-1682439716851.png

 

It's the first column trade_id where the issue is - you should not need to add string in front of it.

 

Spoiler
messages: update trade_id: trade_id, exch_message, broker_id: extractBrokerId each exch_message from messages

 

View solution in original post

2 REPLIES 2

Michaela
Community Manager Community Manager
Community Manager

Hi @bldulam1 - you are very close! I had a go running your solution and see a different meta than what you have shared. 

Michaela_0-1682439707853.png

Michaela_1-1682439716851.png

 

It's the first column trade_id where the issue is - you should not need to add string in front of it.

 

Spoiler
messages: update trade_id: trade_id, exch_message, broker_id: extractBrokerId each exch_message from messages

 

ashish31
New Contributor III

He must had ran the update statement twice, hence the issue with trade_id column.