getReactiveMetrics
Syntax
getReactiveMetrics(name)
Arguments
name is a string indicating the engine name.
Details
Get factors specified in metrics of the engine generated by
createNarrowReactiveStateEngine
.
It returns a table cotaining two columns:
-
metricName: the name of factors.
-
metricCode: the detailed formula for calculations.
Examples
dummy = streamTable(1:0, ["securityID1","securityID2","securityID3","createTime","updateTime","upToDatePrice","qty","value"], [STRING,STRING,STRING,TIMESTAMP,TIMESTAMP,DOUBLE,DOUBLE,INT])
outputTable = streamTable(1:0,["securityID1","securityID2","securityID3","createTime","updateTime","metricNames","factorValue"], [STRING,STRING,STRING, TIMESTAMP,TIMESTAMP,STRING,DOUBLE])
factor = [<createTime>, <updateTime>,<cumsum(qty)>]
Narrowtest = createNarrowReactiveStateEngine(name="narrowtest1",metrics=factor,metricNames="factor1",dummyTable=dummy,outputTable=outputTable,keyColumn=["securityID1","securityID2","securityID3"])
getReactiveMetrics("narrowtest1")
metricName metricCode
factor1 cumsum(qty)
Related functions: createNarrowReactiveStateEngine, addReactiveMetrics