validate: Validates data in a data.table

Description Usage Arguments Value

Description

Validates data in a data.table

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
validate(rule, dt, ...)

## S4 method for signature 'DataRule,data.table'
validate(rule, dt)

## S4 method for signature 'ConditionRule,data.table'
validate(rule, dt)

## S4 method for signature 'RulesContainer,data.table'
validate(rule, dt, conn = NULL,
  url.pattern = NA_character_)

## S4 method for signature 'EnumRule,data.table'
validate(rule, dt)

## S4 method for signature 'ExternalRule,data.table'
validate(rule, dt)

## S4 method for signature 'ForeignKeyRule,data.table'
validate(rule, dt)

## S4 method for signature 'RegexRule,data.table'
validate(rule, dt)

## S4 method for signature 'RequiredRule,data.table'
validate(rule, dt)

## S4 method for signature 'Schema,data.table'
validate(rule, dt, conn = NULL,
  url.pattern = NA_character_)

## S4 method for signature 'UniqueRule,data.table'
validate(rule, dt)

Arguments

rule

data rule that will be used to find records with errors

dt

data to be validated

...

allows to extend validate function for new data rules

conn

connection to the database

url.pattern

if provided, it will be used to generated url

Value

subset of the original data that contains errors

for 'ConditionRule' records where values in target field don't match specified condition.

for 'RulesContainer' error records with value of key column, target column and rule type

for ‘EnumRule' records where values don’t match given list of valid values.

for 'ExternalRule' records defined by TRUE/FALSE vector of permutations.

for 'ForeignKeyRule' orphan records based on the foreign key constraint.

for ‘RegexRule' records where values don’t match given regular expression.

for 'RequiredRule' records where target field is NA or zero-length.

for 'Schema' same as RulesContainer

for 'UniqueRule' records where values in target field(s) are duplicated.


byapparov/rdqa documentation built on May 13, 2019, 9:54 a.m.