Interactive JSON Validator

Interactive JSON Validator

The Interactive JSON Validator is a dynamic component within DatErica that provides real-time validation for JSON data structures. It ensures that the data being processed adheres to predefined rules and formats, which is essential for maintaining data integrity throughout your pipelines.

Interactive JSON Validator

Configuration Overview

The validator offers a glimpse into the incoming data structure, derived from the output of preceding pipeline components.

Validating Data Structure

  • The Incoming Data Structure Example displays a preview of the data expected from previous components in the pipeline. This aids in setting up appropriate validation rules.

Adding Validation Rules

  • Property Path: Define the JSON property to validate. You can select nested properties within a deeply structured object.
  • Is Required: Specify whether a property must be present in the data object.
  • Check Type: Enforce the data type for the property, such as STRING, NUMBER, BOOLEAN, etc.
  • Check Value: Establish value-based rules, which vary depending on the property type. For instance, you might use a regular expression for strings, or define a range for numerical values.
Interactive JSON Validator Rules

Rule Application and Alerting

  • When setting a rule, labels such as Normal and Firing indicate whether the current data sample passes or fails the validation.
  • If the data structure is an array of objects, each object is individually assessed against the configured rules.
  • Failing validation during a pipeline run will trigger an alert and halt execution, preventing subsequent components from processing the invalid data.

Alert Details and Error Reporting

  • In the case of a validation error, the alert will contain detailed information about which objects in the array failed, the specific rules that were violated, and both the actual and expected values.
  • This validation is based on user-defined expectations. Discrepancies between the actual data and these expectations will result in an alert.

Sample Alert Notification for Receiver

Alert Severity: ⚠️ High
Pipeline Name: Main delivery aggregation
Run ID: 65f75f10c060ac982bffa5c2-1712506260004
Component ID: interactive-json-validator
Node ID: interactive-json-validator-87e4087b-396c-4965-8e06-29d5d8c031a3

Errors:

• Element 1: Field stock value (34) is not greater than 35.
• Element 4: Field stock value (32) is not greater than 35.
• Element 22: Field stock value (26) is not greater than 35.
• Element 26: Field stock value (17) is not greater than 35.
• Element 28: Field stock value (7) is not greater than 35.

By carefully crafting validation rules that reflect the requirements of your data workflows, the Interactive JSON Validator serves as a crucial checkpoint that preserves the quality and reliability of your data processing operations.