Define the expected schemas in a data contract and test your datasets against defined contracts.
Defining a data contract
Peliqan supports the open source data contract standard defined by Paypal:
https://github.com/paypal/data-contract-template
Here’s a very simple example in YAML format, with many properties omitted:
dataset:
- table: campaigns
columns:
- column: id
logicalType: int
isNullable: false
description: unique id of the marketing campaign
- column: name
logicalType: string
isNullable: true
description: name of the marketing campaignTesting a dataset for compliance with a data contract
Once you have defined a data contract, you can use a script to test one or more tables for compliance with the given contract.
Here’s a simplified end-to-end example:
When the test fails, you could send out an alert to e.g. a channel in Slack:
Click here for more info on the Slack connector