Nayan
September 1, 2024, 1:04am
1
https://learninghub.kx.com/forums/topic/capstone-2-1-3-and-1-7-fail-niy-error
1.7 fail
code:
/ Step 1.7
csvPath: getenv[`AX_WORKSPACE], "/FP.Data/message.csv";
/ Load the CSV file and store it in a table named messages
messages: ("I S") 0: csvPath; / 'I' for trade_id (int) and 'S' for exch_message (string)
messages: update trade_id_str: string trade_id from messages;
any suggestions?
mwoods
September 2, 2024, 12:15pm
2
Can you please share a screenshot of what you are running and the error? I cannot see from the code snippet what exactly you have run (apologies this formatting issue on the forum is due to be fixed soon).
Bit mismatch error indicates your column is one datatype and the data you're trying to add is different datatype.
Here is what meta messages returns and the first few rows of the table if that helps.
Nayan
September 2, 2024, 2:53pm
3
Here's the attached screenshot. Thank you!
mwoods
September 2, 2024, 3:25pm
4
Does line 36 run for you? I would think that would throw a type error as you'e passing a string to hsym. https://code.kx.com/q/ref/hsym/
Can you print out values of csvPath, meta messages and first few lines of messages in console and send screenshot?
Nayan
September 2, 2024, 3:33pm
5
here's the console ss, It throws nyi (not implemented yet) error for "first 10 messages"
Hi Naya n,
This is an example format of how you should load in a CSV file:
t:("SFI";enlist",") 0: `$csvPath No spaces between the column types The use of 'enlist' which is the delimiter used to return the CSV as a table Use this format to adjust your answer accordingly. If you have any further questions, please let me know :)
Thanks,
Megan