From 9604e6c6d6f4116c318eac204329acaa44310b6d Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 22 Feb 2024 19:55:42 +0100 Subject: [PATCH] Update README --- README.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b34ad848..14f337a5 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,36 @@ We run the tests: ```bash $ datacontract test https://datacontract.com/examples/orders-latest/datacontract.yaml -# returns: 🟢 data contract is valid. Run 22 checks. + +# returns: +Testing https://datacontract.com/examples/orders-latest/datacontract.yaml +╭────────┬─────────────────────────────────────────────────────────────────────┬───────────────────────────────┬─────────╮ +│ Result │ Check │ Field │ Details │ +├────────┼─────────────────────────────────────────────────────────────────────┼───────────────────────────────┼─────────┤ +│ passed │ Check that JSON has valid schema │ orders │ │ +│ passed │ Check that JSON has valid schema │ line_items │ │ +│ passed │ Check that field lines_item_id is present │ line_items │ │ +│ passed │ Check that field order_id is present │ line_items │ │ +│ passed │ Check that field sku is present │ line_items │ │ +│ passed │ values in (order_id) must exist in orders (order_id) │ line_items.order_id │ │ +│ passed │ row_count >= 5000 │ line_items │ │ +│ passed │ Check that required field lines_item_id has no null values │ line_items.lines_item_id │ │ +│ passed │ Check that unique field lines_item_id has no duplicate values │ line_items.lines_item_id │ │ +│ passed │ Check that field order_id is present │ orders │ │ +│ passed │ Check that field order_timestamp is present │ orders │ │ +│ passed │ Check that field order_total is present │ orders │ │ +│ passed │ Check that field customer_id is present │ orders │ │ +│ passed │ Check that field customer_email_address is present │ orders │ │ +│ passed │ row_count >= 5000 │ orders │ │ +│ passed │ Check that required field order_id has no null values │ orders.order_id │ │ +│ passed │ Check that unique field order_id has no duplicate values │ orders.order_id │ │ +│ passed │ duplicate_count(order_id) = 0 │ orders.order_id │ │ +│ passed │ Check that required field order_timestamp has no null values │ orders.order_timestamp │ │ +│ passed │ freshness(order_timestamp) < 24h │ orders.order_timestamp │ │ +│ passed │ Check that required field order_total has no null values │ orders.order_total │ │ +│ passed │ Check that required field customer_email_address has no null values │ orders.customer_email_address │ │ +╰────────┴─────────────────────────────────────────────────────────────────────┴───────────────────────────────┴─────────╯ +🟢 data contract is valid. Run 22 checks. Took 8.875758 seconds. ``` Voilà, the CLI tested that the _datacontract.yaml_ itself is valid, all records comply with the schema, and all quality attributes are met.