Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I guarantee data uniqueness in the YTsaurus table?

Tags:

ytsaurus

I have a table with several key columns. The combination of values of those columns should be unique for every row of the table. However, duplicate entries may occur due to a human mistake, and that should be avoided.

What are the best practices here? Are there any built-in options to validate uniqueness or to automatically discard duplicate entries?

like image 300
Ivan Smirnov Avatar asked Oct 19 '25 00:10

Ivan Smirnov


1 Answers

In YTsaurus, uniqueness constraints are a part of the schema of a table. Namely, there's the unique_keys attribute of the schema.

Uniqueness constraint is only applied to the table's key. A key is a tuple of key columns. Key columns are those that have their sort_order specified. (The columns constituting the key of a table are always a prefix of the full list of columns.)

like image 124
shakurov Avatar answered Oct 22 '25 05:10

shakurov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!