import dolphindb as ddb
s = ddb.session()
s.connect("127.0.0.1", 8848,"admin","123456")
dbName="dfs://forwardtekDdb2"
tableName='windTurbine'
script="""
dbName='{db}'
if(exists(dbName))
dropDatabase(dbName)
tableSchema = table(100:0,`id`tm`val,[INT,DATETIME,FLOAT]);
db1 = database("",VALUE,2017.01M..2020.12M)
db2 = database("",RANGE,0..1000*30+1)
db = database(dbName,COMPO,[db1,db2])
db.createPartitionedTable(tableSchema,'{tb}',`tm`id)
""".format(db=dbName,tb=tableName)
s.run(script)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…