关于dolphindb:怎么导入特殊时间类型的数据

37次阅读

共计 691 个字符,预计需要花费 2 分钟才能阅读完成。

我有一个 csv 文件,其中工夫列前面多一个字符 Z,样本数据如下所示:

code,ts,close,volume
TXFL9,2019.12.17T01:54:01.001123321Z,12001,1
TXO12400A0,2019.12.17T01:54:01.867000123Z,30,10
UDFL9,2019.12.17T01:54:04.381321124Z,28313,1
...

当初我想用下列代码导入数据到 DolphinDB database 分布式表中,可是没胜利:

dbName = "dfs://db1"
path = "d:/ticks.csv"
if(existsDatabase(dbName)){dropDatabase(dbName)
}
db = database(dbName,VALUE,2019.09.04..2020.10.09)
modaltb = table(1:0, `code`timestamp`close`volume,[SYMBOL,TIMESTAMP,DOUBLE,DOUBLE])
db.createPartitionedTable(modaltb, `trade,`timestamp)

schemaTb=extractTextSchema(path)
update schemaTb set type=`NANOTIMESTAMP where name=`ts ;
loadTextEx(dbHandle=db,tableName='trade', partitionColumns='timestamp',filename=path,schema=schemaTb)

求教一下该怎么实现?

正文完
 0