如何在kdb +中批量upsert

时间:2016-02-11 19:10:06

标签: bulk upsert kdb

可以将upsert批量转换为分区表。我已经尝试了几种语法组合,但都没有。

实施例

`:2015.12/calls/ upsert (1; 4389; 2015.12.01T07:56:50) // single upsert works
`:2015.12/calls/ upsert (1 2; 4389 4397; 2015.12.01T07:56:50 2015.12.01T07:56:58) // do not work
`:2015.12/calls/ upsert ((1; 4389; 2015.12.01T07:56:50);(2; 4397; 2015.12.01T07:56:58)) // do not work.

由于

1 个答案:

答案 0 :(得分:4)

您需要upsert ,即:

/ substitute `COL1`COL2`COL3 with actual column names
`:2015.12/calls/ upsert flip `COL1`COL2`COL3!(1 2; 4389 4397; 2015.12.01T07:56:50 2015.12.01T07:56:58)