Sravani
Sravani

Reputation: 97

How to add unique constraint in kusto table

I am newly working on kusto DB. I want to ignore the data which is already existed in table. So if I use unique constraint then duplicate data won't be get inserted. So how to apply unique constraint in kusto

Upvotes: 0

Views: 370

Answers (2)

GordonBy
GordonBy

Reputation: 3407

My go-to method is to use the arg_max function with a Timestamp.

It'll grab the latest values for the columns you specify;

MyTable
| summarize arg_max( Timestamp, ColYouAreAbout, AnotherColYouCareAbout) by SomeId;

Upvotes: 0

Yoni L.
Yoni L.

Reputation: 25955

there's no 'unique' constraint in Kusto. you can handle duplicate data using a variety of techniques, documented here: Handle duplicate data in Kusto

Upvotes: 1

Related Questions