The goal is to create a function that takes the following inputs:
and adds new rows to the named table with the table data provided.
I’ve come up with a simple solution to the function:
appendToTable:{[d;p;t;x] path: sv d,(
$string[p]),t,`; path upsert .Q.en[d;x]}
However I am receiving this error upon checking my answers and I don’t know what is failing. Any suggestions on which inputs to try to recreate the error? Thanks
Your answer is doing the expected action correctly - the issue is a difference with the tests verses sample code. It should show no trailing forward slash after trade so the below
Example of code appendToTable[:hdb2;2016.01.01;
trade;(sym:JPM
GEGE;size:100 200 300;exchange:
N)] :hdb2/2016.01.01/trade/ appendToTable[
:hdb2;2016.01.01;trade;([]sym:
JPMBP;size:700;exchange:
T)] `:hdb2/2016.01.01/trade/
should be
Example of code appendToTable[:hdb2;2016.01.01;
trade;(sym:JPM
GEGE;size:100 200 300;exchange:
N)] :hdb2/2016.01.01/trade appendToTable[
:hdb2;2016.01.01;trade;([]sym:
JPMBP;size:700;exchange:
T)] `:hdb2/2016.01.01/trade
We will update the sample code to reflect this -thanks for highlighting!
Thanks,
Michaela
I believe you want to be appending to the table without the trailing forward slash? i.e.
sv d,(
$string[p]),t