Please tell me why the error occurred when I called <ffill(Ticker)>
in DolphinDB reactive state engine. I also used select ffill(Ticker)
in MySQL and it returned the expected result.
//Code `Time`Date`Ticker`Open`NumberOfTrades
//`SYMBOL`TIME`DATE`SYMBOL`FLOAT`INT
metrics = array (ANY, 5)
metrics[0] = <Time>
metrics[1] = <Date>
metrics[2] = <ffill(Ticker)> // <Error, <Ticker> ok
metrics[3] = <ffill(Open)>
metrics[4] = <ffill(NumberOfTrades)>
select Ticker, ffill(Ticker) as TickerFill from toutput //ok
tt = createReactiveStateEngine(name="Demo", metrics=metrics, dummyTable=tinput, outputTable=toutput, keyColumn=`Code)
subscribeTable(tableName=`tinput, actionName="testsub", handler=tableInsert{tt})
DolphinDB’s reactive state engine does not support
ffill
on SYMBOL or STRING. You can try to callnullFill
to replace NULL values.