Home › Forums › kdb+ › What exactly does .u.end do? › Re: What exactly does .u.end do?
-
Hi,
1-3) Correct.
4) yes this is a date, you will notice end is called from endofday function in tick.q, which is called when the date rolls, checked on the timer.
endofday:{end d;d+:1;if[l;hclose l;l::0(`.u.ld;d)]};
Where d is the current date the tp is running.
.u.end will be an EOD function on the subscriber, commonly an RDB an example below from r.q:
/ end of day: save, clear, hdb reload .u.end:{t:tables`.;t@:where `g=attr each t@:`sym;.Q.hdpf[`$":",.u.x 1;`:.;x;`sym];@[;`sym;`g#] each t;}
Hope that helps.
Patrick