Validate input/output data

Validate input/output data

Cloud_Edition_button.webp

This page provides examples of what your input and output data might look like in your stream’s Validate function. These views can help you troubleshoot and validate that the function works as intended. The images below show the input/output data from the Validate function in the example stream, Handling erroneous and duplicated records.

Validate is used in the following Example Streams:

Input data

The Input data window shows the raw data received by Validate from the previous functions in the stream. This view can help you verify the incoming data to be validated.

Validate_function_input_data.png

Output data

The Output data window shows a subset of the validated data. It will only show the data that has successfully passed the configured validation rules, allowing you to verify that the function has correctly applied the rules.

validate_function_output_data.png

Validate in the example stream Handling Erroneous and Duplicated Records

The rule on the field userTechnicalId checks the following validations:

  • The field must be of type string

  • It must be exactly 36 characters long

  • It is required to be there

validation_rule2.png
Rule on the userTechnicalId field

The rule on the field kWhCharged checks the following validations:

  • It is required to be there

Validation_rule_1.png
Rule on the kWhCharged field

The output shows two fewer records than the input. One of these records contains an invalid userTechnicalId, and the other does not have a value for kWhCharged.

Data_Correction_invalid_records.png
Data correction with the two invalid records from the above stream

Multiple outputs

If you choose to create a new output in the configuration, a second output will appear in the input/output data. In the example below, invalid records are sent both to Data Correction and forwarded to the configured output function.

Validate_multiple_output.png
Validate configuration with multiple outputs