Skip to content

Check Templates

Check Templates empower users to efficiently create, manage, and apply standardized checks across various datastores, acting as blueprints that ensure consistency and data integrity across different datasets and processes.

Check templates streamline the validation process by enabling check management independently of specific data assets such as datastores, containers, or fields. These templates reduce manual intervention, minimize errors, and provide a reusable framework that can be applied across multiple datasets, ensuring all relevant data adheres to defined criteria. This not only saves time but also enhances the reliability of data quality checks within an organization.

Let's get started 🚀

Step 1: Log in to your Qualytics account and click the “Library” button on the left side panel of the interface.

library library

Step 2: Click on the “Add Check Template” button located in the top right corner.

add-check add-check

A modal window titled “Check Template Details” will appear, providing you the options to add the check template details.

template-detail template-detail

Step 3: Enter the following details to add the check template:

  • Rule Type (Required)
  • Filter Clause
  • Description (Required)
  • Tag
  • Additional Metadata
  • Template Locked

1. Rule Type (Required): Select a Rule type from the dropdown menu for data validation, such as checking for non-null values, matching patterns, comparing numerical values, or verifying date-time constraints. Each rule type defines the specific validation logic to be applied.

For more details about the available rule types, refer to the "Check Rule Types" section.

Note

Different rule types have different sets of fields and options appearing when selected.

rule-type rule-type

2. Filter Clause: Specify a valid Spark SQL WHERE expression to filter the data on which the check will be applied.

The filter clause defines the conditions under which the check will be applied. It typically includes a WHERE statement that specifies which rows or data points should be included in the check.

Example: A filter clause might be used to apply the check only to rows where a certain column meets a specific condition, such as WHERE status \= 'active'.

filter-clause filter-clause

Adjust the Coverage setting to specify the percentage of records that must comply with the check.

Note

The Coverage setting applies to most rule types and allows you to specify the percentage of records that must meet the validation criteria.

coverage-setting coverage-setting

3. Description (Required): Enter a detailed explanation of the check template, including its purpose, applicable data, and relevant information to ensure clarity for users.

Example: "Asserts that the Target has fewer rows than the Reference." This example demonstrates how to convey the intent of the check, making it easier for others to understand and implement the template correctly.

4. Tag: Assign relevant tags to your check template to facilitate easier searching and filtering based on categories like "data quality," "financial reports," or "critical checks."

description description

5. Additional Metadata: Add key-value pairs as additional metadata to enrich your check. Click the plus icon (+) next to this section to open the metadata input form, where you can add key-value pairs.

metadata metadata

Enter the desired key-value pairs (e.g., DataSourceType: SQL Database and PriorityLevel: High). After entering the necessary metadata, click "Confirm" to save the custom metadata.

key-value key-value

6. Template Locked: Check or uncheck the "Template Locked" option to determine whether all checks created from this template will have their properties automatically synced to any changes made to the template.

For more information about the template state, jump to the "Template Statesection below.

template template

Step 4: Once you have entered all the required fields, click the “Save” button to finalize the template.

Warning

Once a template is saved, the selected rule type becomes locked and cannot be changed.

save-button save-button

After clicking the "Save" button, your check template is created, and a success flash message will appear stating, "Check Template successfully created."

message message

After saving the check template, you can now Apply a Check Template to create Quality Checks, which will enforce the validation rules defined in the template across your datastores. This ensures consistent data quality and compliance with the criteria you’ve established.

Template State

Any changes to a template may or may not impact its related checks, depending on whether the template state is locked or unlocked. Managing the template state allows you to control if updates automatically apply to all related checks or let them function independently.

Unlocked

  • Quality Checks can evolve independently of the template. Subsequent updates to an unlocked Check Template do not affect its related quality checks

Locked

  • Quality Checks from a locked Check Template will inherit changes made to the template. Subsequent updates to a locked Check Template do affect its related quality checks

Info

Tags will be synced independently of unlocked and locked Check Templates, while Description and Additional Metadata will not be synced. This behavior is general for Check Templates.

graph TD
A[Start] -->|Is `Template Locked` enabled?| B{Yes/No}
B -->|No| E[The quality check can evolve independently]
B -->|Yes| C[They remain synchronized with the template]
C --> D[End]
E --> D[End]

Last update: September 6, 2024