hi, gurus,
I have a timer function that calls a remote function ‘diff’ like this:
.z.ts:{show h “diff a
b`c”}
\t 1000
the result looks like
name age
-----------------
Bob 20
George 30
How could I save this result into a local table so that I can look into later?
thank you in advance!
Razr
to assign the result to a global variable you can use
.z.ts:{show result::h “diff a
b`c”}
or
.z.ts:{show get result set h "diff
ab
c"}
to assign to a function local variable, just use a single :
.z.ts:{show result:h “diff a
b`c”}
You can also define a local schema and simply use upsert. This way you can insert a timestamp and track the differences…something along the lines of:
tab:(name:;age:
int$();time:`time$())
.z.ts:{res upsert h"diff
ab
c";update time:.z.t from `res where null time}
Hope it helps.
Cheers,
Sean
This works for me. did not know ‘::’ has the magic.
Thanks a lot, Charles!
I was actually thinking about doing this in later stage :)
Thank you!