我有一个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)
请教一下该怎么实现?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…