There was a discussion about this (or at least a similar issue) on the k4 listbox a few months back. The solution
is to just drop in the full path of the segment into your query. You will need to build a dictionary
that can map your query inputs to the correct segments.
e.g.
Suppose that you had some trades segmented by symbol range (A-M and N-Z) and then partitioned by date.
Instead of running a standard query like:
select from trades where date=2015.01.07, sym=`AAPL
you could run something along the lines of:
select from $":/AtoM/2015.01.07/trades" where sym=AAPL
The lookup of the segment could then be wrapped up into a function so that you could write something like:
select from findsegment[2015.01.07;AAPL;trades] where sym=`AAPL
That is expected behaviour when the last line of your function has a semi-colon at the end (generic null is returned).
Regards,
Meredith Grieve
Financial software developer
AquaQ Analytics
q)/ -returns a generic null (can’t see it on the command line)
q){x+1;} 2
q)/ -but the output is a generic null
q)(::) ~ {x+1;} 2
1b
q)/ -shows a list of generic nulls if you run function on a list using an adverb
table: ([] col1: foo1foo2foo3; col2: 100,101,102)`
How can I use each row of table on my func?
for single value vector I simple use:
f[foo;] each exec col2 from table`
but exec col1,col2 from table give me dictionary and I somehow should associate arg1, arg2 with col1,col2 of this dictionary.
Mark’s links to the k4 listbox appear to be enticing non-licensed users to request access, so to clarify -
Please note that the kdb+/k4 listbox is a forum for _ licensed customers only _.
If you work at a company that has licensed kdb+, you may request to join the kdb+ Listbox by submitting your company email address via the link in the kdb+ listbox section at