For example, I need to calculate Alpha147 factor. The script is shown as follows:
def alpha147SQL(vector) {
...
}
input = select tradingdate, symbol, closeprice from loadTable("dfs://xxxx", "level2") where tradingdate = 2020.01.02
alpha147DDBSql = select alpha147SQL(closeprice) from input context by symbol