How to ensure a kdb partitioned table data is not duplicated? -


i created partitioned db gets data daily stored files. works fine i'm worried kdb add duplicate rows if run partition script twice same day files.

should use 'key' check existence of partitioned tables or there simpler way insure kdb not duplicate stored data?

i'm not sure if issue 1) you're afraid you'll load same file more once, or 2) multiple files may contain same data, don't want subsequent loads create duplicates.

for 1), if daily stored files use create db not updated , have unique names, possibly track files have been loaded , skip these on subsequent runs.

2) though cannot physically key table, have "key" columns, e.g. sym, date, time, side etc. can check if "key" values of chunk loading appear in date partition. if do, drop records, while keeping others.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -