user1167650
user1167650

Reputation: 3207

KDB Window Join Limit Error

I'm trying to do a window join on the data set below (just playing around with it).

w:(((1%24)%2);0f){"z"$y-x}\:dd.time;
f:`sym`time;
wj[w;f;dd;(dd;(::;`price))];

and this results in a error:

k){[e;d;a;b]e@'d@\:a+!b-a}
'limit
!:
205558234298187785

dd table:

sym     time                    price
B1VVGZ5 2015-07-30T12:47:57.000 240.9
0216238 2015-07-30T08:16:22.383 5.19
0216238 2015-07-30T08:18:36.000 5.195
0216238 2015-07-30T08:18:36.217 5.195
0216238 2015-07-30T08:22:13.527 5.2
0216238 2015-07-30T08:22:13.730 5.2
0216238 2015-07-30T08:26:34.437 5.2025
0216238 2015-07-30T08:29:00.920 5.2
0216238 2015-07-30T08:29:01.113 5.2
0216238 2015-07-30T08:29:01.113 5.2

and meta on that table:

c     t   f   a
sym   s     
time  z     
price f     

The other oddity is that this code worked and then didn't work. Any ideas on what's going on?

EDIT: Exactly how I reproduce this error:

dd:select [10] sym:symbol,time:"z"$FILL_DATE,price:FILL_PRICE from update symbol:`$Sedol from select from fillData where date=2015.07.30;

w:(((1%24)%2);0f){"z"$y-x}\:dd.time
f:`sym`time

wj[w;f;dd;(dd;(max;`price))]

Upvotes: 1

Views: 642

Answers (1)

jgleeson
jgleeson

Reputation: 955

Take a look at the list of kdb+ errors

limit -> tried to generate a list longer than 2,000,000,000, or serialized object is > 2GB, or 'type if trying to serialize a nested object which has > 2 billion elements.

This could explain why the code worked previously (smaller dataset?).

Which version of q are you using? I would recommend upgrading to 3+ as the vector size limit was removed in version 3.0.

Upvotes: 1

Related Questions