Exercise 6: Create a Uniqueness Check
  • 08 Jul 2024
  • 1 Minute to read
  • PDF

Exercise 6: Create a Uniqueness Check

  • PDF

Article summary

Learning Goals
  • How do I test for uniqueness?
  • How do I compare data against a Defined standard or rule?

Step 1 - Create a Standard Test

  • Click New to create a New Standard Test
  • Name the Test "{{your id column}} is Unique"
  • Set the Quality Dimension to "Uniqueness"
  • Set the Severity Level to "High"
  • Give the test a nice description like "Check every {{your id column}} is unique and show as failures any {{your id column}}s with multiple records in the RAW.{{your table} table."

image.png

Step 2 - Configure "What do you want to test?"

  • Set Data Source = Sample Data Source - Snowflake Data Warehouse
  • Set How to get the data = Row Count grouped by Column
  • Set the table to your assigned RAW table.
  • Set the column to the column you want to check for Uniqueness
  • Click the Preview and Refresh Options button

image.png

Step 3 - Configure "What do you want to compare to?"

  • Select "Defined Standard or Rule"
  • Set How to define the control data = Numeric Value
  • Set Target Value = 1

image.png

Step 4 - Review Result Configuration

  • Scroll down to the Result Configuration section
  • Switch to Only Keep Failures = Yes
  • Switch to Abort Processing After Failures = Yes, after 1000 failures
  • Set Scripts Include Order By = Yes

image.png

Tips About Validatar

  • You can select a defining Dimension and Severity Level for each test.
  • You can define which fields are key fields and and value fields.
  • Using the Result Configuration options helps optimize test execution and result storage.

Was this article helpful?