KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ What exactly does .u.end do? Re: What exactly does .u.end do?

  • pmallon

    Member
    March 17, 2022 at 12:00 am

    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