Skip to content

Commit bc1218f

Browse files
authored
Update RuleSet_DSL_Full.md
1 parent 86370ef commit bc1218f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

RuleSet_DSL_Full.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,13 @@ Let's see how RuleSet can be used to write data validation rules. Given below is
321321
| 15 | PSA8777 | Eain Yow | Ng | MAS | 1998 | 38 Jalan Ampang, Kuala Lumpur | 50450 |
322322
<br>
323323

324-
Here is a simple set of rules that only specify value types for each column. Note that lines starting with `//` are considered comments in RuleSet. Comments may be entered anywhere in the rules file.
324+
Here is a simple set of rules that only specify value types for columns.
325+
<be>Note that lines starting with `//` are considered comments in RuleSet. Comments may be entered anywhere in the rules file.
325326
```dsl
326327
//Rules to validate squash_playsers.csv
327328
//These rules specify value type for each column, except for Zip_Code. Why do you think value type evaluation has been
328-
//skipped for Zip_Code? How would you do it using RuleSet? Find out in the more complex rule specifications below.
329-
//-------------------------------------
329+
//skipped for Zip_Code? How would you do it using RuleSet? Find out below in the more complex rule specifications below.
330+
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------
330331
331332
column names in ['Rank', 'PSA_ID', 'First_Name', 'Last_Name', 'Country', 'Year_of_Birth', 'Address', 'Zip_Code']
332333
all columns required
@@ -362,15 +363,16 @@ Here is a more complex, fine-grained set of rules that specify additional constr
362363
```dsl
363364
//Rules to validate squash_playsers.csv
364365
//In addition to value type these rules specify additional constraints.
366+
//Column Rank should be greater than 0.
365367
// Column ID should be unique; each value should start with 'PSA'; PSA0000 is not a valid value.
366-
// Column Country can have only one of the following values:
368+
// Column Country can have one of the following values:
367369
//'EGY', 'PER', 'NZL', 'IND', 'MAS', 'WAL', 'ENG', 'FRA', 'SUI'.
368370
//Column Year_of_Birth should have the format 'YYYY'.
369371
//Column Zip_Code is not null.
370372
//Conditional rules:
371373
//Zip_Code for Wales and England should be of type string.
372374
//Zip_Code for all other countries should be of type integer.
373-
//-------------------------------------
375+
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------
374376
375377
column names in ['Rank', 'PSA_ID', 'First_Name', 'Last_Name', 'Country', 'Year_of_Birth', 'Address', 'Zip_Code']
376378
all columns required
@@ -434,7 +436,7 @@ The log file output of ruleset-engine has three levels of output messages.
434436
- Error: Critical issues that prevent the validation process from proceeding correctly:
435437
- Invalid or inaccessible file paths for the rules, data, or reference files.
436438
- Errors encountered while parsing the rules file.
437-
- Failures during the execution of column-level, value-level, or second-order validation rules against the data.
439+
- Failures during execution of column-level, value-level, or second-order validation rules against the data.
438440

439441
Here is the log from validating data table in [Appendix C](#appendix-c) against the simple rule set.
440442
```dsl

0 commit comments

Comments
 (0)