-
Book Overview & Buying
-
Table Of Contents
Building Modern Data Applications Using Databricks Lakehouse
By :
As we’ll see in this section, creating a view is an effective method for validating the uniqueness of a primary key column. Additionally, we can also define alerts in the Databricks Data Intelligence Platform to notify the data stewards of potential data quality issues so that they can take appropriate measures to correct the data integrity.
We can leverage a view to validate the uniqueness of the primary key column. Recall the rides and drivers tables we defined in the previous section. In this example, we’re going to define a view on the incoming data to ensure the uniqueness of a primary key column across the rides Delta table. Create a new query in Databricks by navigating back to your workspace and right-clicking to open a dialog box. Select New | Query to open a new query in the editor. Next, rename the query with a meaningful name, such as rides_pk_validation_vw. Finally, add the following query text to the...