Rules
Following are the configurations and details on how to use different rules in process flows:
Regex Rule
Regex validation rule can either be used for validating if a regex expression is present in the specified target key. Regex extraction rule can be used for extracting the value specified in the first target group in the regex expression and storing the extracted value in the specified target key.
Filter Rule
Filter rule can be used for validating whether the value corresponding to the specified target key passes the specified filter condition. Currently supported operators are [gte, ge, eq, ne, lt, lte, in]. For all operators except 'eq' and 'in', the values corresponding to the key must be numeric or else the rule will fail. For the 'in' operator, user can specify a list of comma separated values. If the value for the key matches any of the value specified in the rule, the filter condition is satisfied.
Substring Rule
This rule can be used for extracting only a substring with specified start and end indexes from the value corresponding to a target key
Concat Rule
This rule can be used for concatenating values corresponding to a list of keys specified in the rule. Users can define the list of keys using a comma separated string. Users also need to specify a delimiter by which these values will be concatenated. If the value corresponding to one of the keys in the list is not found, it would be returned in the result as null
Transformations Rule
This rule can be used to transform the values corresponding to a specified target key. Currently supported transformation operations include:
- rename - Rename the value
- make-uppercase/make-lowercase - Make the resulting value uppercase or lowercase
- add/remove prefix/suffix - Add or remove a prefix/suffix in the value
- replace prefix/suffix - Replace prefix or suffix(if present) in the value
Key Transformations Rule
This rule can be used to transform the specified target key. Currently supported transformation operations include:
- rename - Rename the key
- make-uppercase/make-lowercase - Make the specified key uppercase or lowercase
- add/remove prefix/suffix - Add or remove a prefix/suffix to the key
- replace prefix/suffix - Replace prefix or suffix(if present) in the key
Key Mapping Rule
This rule can used to map values corresponding to a list of keys to the specified target key. The first non-null value corresponding to a key specified in the key list would be mapped back.
Confidence Score Rule
This value can be used for validating the confidence score for a key that is returned in the OCR results. This rule is only applicable for Target Key which are specified in the 'Output Dataset Keys'
Textract Queries Rule
This value can be used for using the AWS Textract 'Queries' feature for mapping the results of a textual query to a target key. The first non-null value returned in the textract result would be mapped back