Databricks has made UNIQUE constraints available in Public Preview for Unity Catalog Delta tables on Databricks Runtime 18.2 and Databricks SQL. These informational constraints permit nullable fields and allow tables to maintain multiple unique keys, contrasting with single primary key limitations. While writes are not blocked by duplicate data, switching constraints to the RELY option enables the engine to eliminate redundant joins and DISTINCT aggregations. To successfully eliminate joins, referencing foreign keys must strictly match the parent constraint's data types, positions, and exact column order.
Key points
Unique constraints default to NORELY status and operate strictly as metadata until verifi…: Unique constraints default to NORELY status and operate strictly as metadata until verified and modified.
Foreign keys must match the exact position, data type, and order of unique constraint col…: Foreign keys must match the exact position, data type, and order of unique constraint columns for join elimination.
Dropping a unique constraint with dependent foreign keys requires the CASCADE option, whi…: Dropping a unique constraint with dependent foreign keys requires the CASCADE option, which deletes those related keys.
Sources checked by our analysis pipeline: 1
Represent multiple unique keys, reference them from foreign keys and use RELY to optimize joins and DISTINCT queries
by Yan Yan, Yuchuan Huang, Xinyi Yu and Gengliang Wang
Data teams often maintain uniqueness guarantees in their pipelines, but without a flexible way to represent all of them in the table schema, users and tools cannot discover them and the query optimizer cannot safely leverage them. Business entities often have more than one value, or combination of values, known to be unique: a users
table might use user_id
as its primary row identifier while its data model also records separate uniqueness guarantees for username
, an email address, and (workspace_id, external_user_id)
.
Databricks already supports PRIMARY KEY and FOREIGN KEY constraints: a primary key identifies a table's rows, and foreign keys can reference it to describe relationships. A table can have only one primary key, however, and its columns must be non-nullable. UNIQUE
constraints, now available in Public Preview for Unity Catalog Delta tables in Databricks SQL and Databricks Runtime 18.2 and above, add a way to record the other uniqueness…
Remote intrusions targeting refrigeration units across multiple European nations caused millions of dollars in losses after unauthorized temperature shifts spoiled tons of perishable food. Businesses routinely link these climate systems to the internet to cut energy expenses and oversee monitoring, but the practice creates severe operational vulnerabilities. The widespread disruptions underscore the physical supply chain dangers stemming from obsolete building management hardware.
The audio brand is pushing quality-of-life interface improvements alongside advanced automated controls to repair its standing following a poorly received 2024 mobile redesign. Chief Executive Officer Tom Conrad committed to reversing the damage from the previous software overhaul, leading to restored navigation utilities and expanded smart capabilities. These incremental additions build upon an operating system update deployed in September that established connectivity for intelligent digital agents.
Severe electrical infrastructure backlogs are forcing technology developers to generate their own electricity on-site to keep artificial intelligence buildouts on schedule. Facilities can become operational in roughly two years by retrofitting retired aviation hardware to burn natural gas. However, higher emissions and inferior efficiency make this stopgap strategy vulnerable to scrutiny as energy demands continue to soar.