I’m attempting to parameterize the w component of a traditional window join:
wj [w; c; t; (q; (f0;c0); (f1;c1))]
I’m hoping to be able to do:
variablename: 1;
w:-variablename 1+:t.time
instead of…
w:-2 1+:t.time
Thanks!
I’m attempting to parameterize the w component of a traditional window join:
wj [w; c; t; (q; (f0;c0); (f1;c1))]
I’m hoping to be able to do:
variablename: 1;
w:-variablename 1+:t.time
instead of…
w:-2 1+:t.time
Thanks!
Hi ticktick,
Enclose variables in brackets to ensure the multipliers are evaluated as a list (some examples below).
When negating a variable you can use the neg function or multiply by -1.
q)show t:.z.d+“t”$200?10000
2020.11.25D00:00:05.480000000 2020.11.25D00:00:09.473000000 2020.11.25D00:00:..
q)window:20
/ w:(-1*var1;var2)+:t.time
/ w:(neg var1;var2)+:t.time
/ or create a list of lists (no semi-colons needed)
q)show w:(-1 1*window)+:t.time
00:00:05.460 00:00:09.453 00:00:06.214 00:00:01.472 00:00:03.986 00:00:03.396..
00:00:05.500 00:00:09.493 00:00:06.254 00:00:01.512 00:00:04.026 00:00:03.436..
Thanks
Connor
?
?