I wrote this script to create a partitioned table using a TSDB storage engine in DolphinDB.
dbName = "dfs://tsdb_value_int"
n = 10000
t = table(n:n, [`int,`long,`short,`float,`double,`string,`char,`bool,`timestamp], [INT, LONG, SHORT,FLOAT, DOUBLE, STRING, CHAR, BOOL, TIMESTAMP])
pt1 = db.createPartitionedTable(table=t, tableName=`pt1, partitionColumns=`int,compressMethods=dict(`timestamp`long,`delta`delta),keepDuplicates=ALL)
It raises an exception:
The sort keys must be specified for TSDB engine.
How can I create a partitioned table in DolphinDB?
To use the TSDB storage engine, you must specify sortColumns of function
createPartitionedTable. The TSDB engine maintains an index based on the order of sort columns, so you can specify those frequently-queried columns as sort columns.See createPartitionedTable — DolphinDB 2.0 documentation for details.