hi, I want to generate array of values like :- [value, move( value,1) , move( value,2) , move( value,3) , move(value,4)] using reactiveStateEngine
please provide me code for this using reactiveStateEngine
input = table(100:0, `index`symbol`value, [INT,SYMBOL,INT])
output = define table with columns of index, symbol, value and array.
picture for better understanding:
given input:- required output:-
Reply as soon as possible.
In SQL, you could use fixedLengthArrayVector function to do this.
t1 = table(take(2020.01.01,18) as date1,1 2 3 1 2 3 4 4 5 5 6 7 8 9 6 7 8 9 as index, `A`A`A`B`B`B`A`B`B`A`A`A`A`A`B`B`B`B as symbol, 4 7 1 8 7 4 5 7 4 8 7 6 9 8 7 5 4 1 as value)
t2= select index, symbol, value,fixedLengthArrayVector(value,move(value,1),move(value,2),move(value,3),move(value,4)) as v1 from t1 context by symbol
In reactiveStateEngine, somehow, it did not support this function for now. Next version will support this function.