Compliance Check Logic Documentation
Overview
The Compliance Check logic component in Vantage is designed to perform rule-based checks on datasets. Each row of data is evaluated against a set of configured compliance rules, and the logic routes the data accordingly. Rows that fail any of the specified compliance rules are sent to the "fail" output port, while those that pass all checks are sent to the "pass" output port. This component is essential for maintaining data integrity and compliance with business standards.
Settings
The Compliance Check component is configurable through several settings, each of which plays a crucial role in its operation. Below are the details for each setting:
Rules
- Name:
rules - Input Type: Array of Objects
- Description: An array of rule objects, where each object defines a compliance rule to be applied to the rows of data. Each rule includes the target column, the operator to evaluate against, the expected value, and a label for easier interpretation of compliance outcomes. The component evaluates each row against all the defined rules.
- Default Value: An empty array (
[]). If no rules are specified, all rows are considered to have passed.
Fail Mode
- Name:
failMode - Input Type: String
- Description: Specifies the condition under which a row is considered to have failed compliance checks. The current options include:
"any": The row will fail if it does not meet any one of the defined rules. This is the default behavior.- Additional modes can be added as needed for more complex compliance requirements.
- Default Value:
"any". This means if a row fails any rule, it will be routed to the "fail" port.
Rule Structure
Each rule in the rules array contains the following attributes:
- Name:
column- Input Type: String
- Description: The name of the column in the dataset that this rule applies to.
- Default Value: None; each rule must specify a column name.
- Name:
operator- Input Type: String
- Description: The condition operator used to evaluate the value of the specified column. Possible values include:
isNotEmptygreaterThanOrEqual- Various comparison and text matching operators (e.g.,
equals,contains, etc.).
- Default Value: None; each rule must specify an operator.
- Name:
value- Input Type: String or Number
- Description: The expected value to evaluate against. This can influence the operator's behavior (e.g., a threshold in numerical comparisons).
- Default Value: Depends on the operator; some operators may not require a value.
- Name:
label- Input Type: String
- Description: A user-friendly name for the rule, which provides context when violations are reported.
- Default Value: The label is optional but highly recommended for readability.
How It Works
- Data Input: The component expects an input dataset that is an array of objects. Each object represents a row of data.
- Unwrapping Data: The provided data is unwrapped using the
unwrapDatafunction to ensure it is in the correct format. - Rule Evaluation: For each row in the data, it iterates over the configured rules and evaluates each rule against the specified column's value using the
evaluateConditionfunction. - Routing Results: Based on the evaluation:
- If a row passes all rules, it is added to the
passoutput. - If a row fails any rule, it is recorded in the
failport, accompanied by compliance notes detailing the reasons for failure.
- If a row passes all rules, it is added to the
- Logging: The component logs the processing result, indicating the counts of passed and failed rows.
Data Expectations
- Input Data Format: The input should be structured as an array of objects, with each object containing key-value pairs that correspond to the dataset's columns.
- Rule Definitions: Each rule must specify valid columns present within the dataset and use compatible operators.
Use Cases & Examples
Use Case 1: Email Validation
- Scenario: A company needs to check that every row in their customer dataset contains a valid email address before sending marketing emails.
- Configuration:
json
{ "rules": [ { "column": "email", "operator": "isNotEmpty", "value": "", "label": "Email required" } ] }
Use Case 2: Age Verification
- Scenario: A service requires users to be at least 18 years old; therefore, the company wants to ensure compliance.
- Configuration:
json
{ "rules": [ { "column": "age", "operator": "greaterThanOrEqual", "value": "18", "label": "Must be 18+" } ] }
Detailed Example: Combined Validation
- Scenario: A university enrollment system wants to ensure that each applicant has both a valid email and is at least 18 years old before proceeding with the enrollment process.
- Configuration:
json
{ "rules": [ { "column": "email", "operator": "isNotEmpty", "value": "", "label": "Email required" }, { "column": "age", "operator": "greaterThanOrEqual", "value": "18", "label": "Must be 18+" } ], "failMode": "any" }
In this configuration, if an applicant does not supply an email or is under 18, they will be routed to the "fail" output with detailed compliance notes.
AI Integrations & Billing Impacts
The Compliance Check component may be integrated with AI tools to enhance rule evaluation, for example, through the use of machine learning to predict potential violations based on historical data trends. However, the specific integrations and additional overhead should be evaluated separately based on organizational needs.
Regarding billing impacts, since this component processes data through predefined rules, it may incur costs based on usage metrics, such as the volume of data processed or the complexity of the compliance checks. It is advisable to consult the Vantage pricing structure to understand the financial implications of using the Compliance Check component in production.