可以定义一个如下所示函数作为transform参数:
def foo(mutable t){ return t.replaceColumn!(`time, nanotime(t.time)) }
也可参阅https://github.com/dolphindb/... 来实现。
在导入的时候我想将int类型的time列转化为nanotime类型,这个最后的transform参数应该怎么写?
schema=extractTextSchema(dataFilePath) update schema set type="NANOTIME" where name="time" tb=table(1:0, schema.name, schema.type) tb=db.createPartitionedTable(tb,`tb1,`date) tmpTB = loadTextEx(db,`tb1,`date,dataFilePath,,,,replaceColumn!{, `time, })
可以定义一个如下所示函数作为transform参数:
def foo(mutable t){ return t.replaceColumn!(`time, nanotime(t.time)) }
也可参阅https://github.com/dolphindb/... 来实现。