Data validation
Every data loader and transformer block has data validation capabilities built-in.
You can define 1 or more test functions in a single block. Each test function accepts a data object as an argument.
Within the body of the function, you can write any type of test you want to validate the input data.
After the block’s main code is executed, the output data is passed into each test function for validation. If any tests fail, then the block run will also fail.
Example
Here is an example of a transformer block with 2 tests:
You can combine all your data validations into 1 test function or you can split them up into multiple test functions. The benefit of splitting them up is that they can run in parallel, speeding up the data validation.
Log output
Each test run is recorded and can be viewed in the logs. Here is an example:
Was this page helpful?