DolphinDB使用createPartitionedTable创建分区表时至少需要两个sort keys吗

我在使用createPartitionedTable创建分区表时时,参数设置成了sortColumns='date', keepDuplicates='LAST'。产生了以下报错:

Usage: createPartitionedTable(dbHandle, table, tableName, partitionColumns, [compressMethods], [sortColumns], [keepDuplicates=ALL], [sortKeyMappingFunction]). Can't use duplicate policy LAST or FIRST when the number of sort keys is less than 2.'

请问是必须要有至少两个sort keys才可以吗?

请先 登录 后评论

1 个回答

levenew

sortColumns参数至少要有两列,一般是key + ts,最后一列识别成时间列,其余列字段作为排序的索引列

例如,sortColumns=`securityID`ts,  key可以多列

请先 登录 后评论