nohros
nohros

Reputation: 327

How to bulk upsert in kdb+

It is possible to bulk upsert into a partitioned table. I have tried several of syntax combination and none works.

Ex.

`: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.

Thanks

Upvotes: 1

Views: 862

Answers (1)

Igor Korkhov
Igor Korkhov

Reputation: 8558

You need to upsert a table i.e.:

/ 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)

Upvotes: 4

Related Questions