2023.09.07 06:31 AM
Hi there,
I am currently working with KX Insights Enterprise and I am having a problem.
I have the following code to display and work with some tables:
foo: {[id; d1; d2; size; handle]
d_f:(`table`startTS`endTS`filter`groupBy`agg)!(`table_test; date1; date2;(("="; `sym; id); ("="; `side; "0"); ("="; `size; size)); enlist `time; enlist (`avgprice`avg`price));
t_f: handle(`.kxi.getData; d_f; `;()!());
t_f
}
h: hopen`$":some_dir:4000";
res: foo[id; date1; date2; ;h] each 500000 1000000 10000000
res
hclose h;
so, this code will call the foo function which receives an id, two dates and a handle, in order to query a table from a database. I am trying to call this method several times using an iterator, for different sizes. This code is actually working when I use a query, and I run the scratchpad, giving me the actual tables I am asking for. Instead, when I use it as a data source, I got the rank error, and I cannot figure out what it is actually happening.
Some advice?
Kind Regards!
2023.09.20 01:57 AM
It looks like you are trying to send an IPC query from the database to the database which is not supported. It is unclear where you are running it.
2023.09.11 02:09 AM
Hi @cperezln !
This isn't a valid query for the qsql endpoint. The difference between Query and View is that a view would be calling '/servicegateway/qe/qsql'
whereas the query goes via Scratchpad.
If you have any more questions feel free to reach out.
Thanks,
Megan 🙂
2023.09.15 02:15 AM
Why is not a valid query for qsql endpoint?
Thanks,
Cristian
2023.09.15 02:42 AM
@megan_mcp sorry I did not tag you 🙂
2023.09.20 01:57 AM
It looks like you are trying to send an IPC query from the database to the database which is not supported. It is unclear where you are running it.
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.