

matt_moore
Forum Replies Created
-
This does not seem like a good idea for handling entitlements. Sending a sync call back down the just opened handle with .z.w runs the risk of a dead-lock between processes. There is also a dedicated message handler for user/pass checks (.z.pw). This happens first before .z.po and by default returns 1b or your permissions code can return 0b to not grant access. E.g.
.perm.users:(),`matm; .z.pw:{[user;pass] $[user in .perm.users;1b;0b]}; // client session pass hopen `::12345:matm:abc 5i // client session fail hopen `::12345:user:abc 'access
qPython supports user/pass in the connection so these users will need to adjust how they are connecting to the Python APIs once this change is in place.
Existing kdb processes should authenticate themselves this way as well.
the .z namespace | Reference | kdb+ and q documentation – Kdb+ and q documentation (kx.com)
-
update `p#sym from q / or @[q;`sym;`p#]
/ may need to sort first if it isn’t already
update `p#sym from `sym`time xasc q
-
wj
requires parted attribute on sym column of 2nd table:t and q are simple tables to be joined (q should be sorted `sym`time with `p# on sym)
Window join | Reference | kdb+ and q documentation – Kdb+ and q documentation (kx.com)
I’ve found when doing this with more than one sym column you need to join them together and sort/apply part to a combined column.Also depending on what you are doing, an aj at the start and end of your window can be faster but depends on what you are trying to do.
-
matt_moore
MemberMarch 15, 2022 at 12:00 am in reply to: Understanding this line from vanilla tick set upIt’s creating a unary projection / composition for the part in brackets, could achieve the same with a lamda function:
q)(`time`sym~2#key flip value@) ~[`time`sym]#[2]!+@[.:]
q)(`time`sym~2#key flip value@) each t 110b q){`time`sym~2#key flip value x} each t 110b
* there is an overhead with using lambdas so in tick it’s preferred to be as efficient as possible
-
Yes, you would need to add logging in .z.pw. .z.pw is called before .z.po so if a user fails this check, .z.po won’t be called.
-
Take a look at what each part of the where clause looks like:
// this is a dictionary q)2#l x| 2 y| `y // and this is a nested list of your x and y columns with no rows matching above q)flip value flip key t 1 `x 2 `y 3 `z
To correct, just key t
q)select from t where (2#l) ~/: key t x y| z ---| - 2 y| b