← define_datapoint_ruleset operator page · definitions/define_datapoint_ruleset/unconditioned_rule/consequent_alone
pandas ✅ · DuckDB ✅
a rule with no antecedent, Me_1 >= 0.
define datapoint ruleset: "In case the antecedentCondition is absent then it is assumed to be always true, therefore the consequentCondition is expected to evaluate to true for all the Data Points".
ruleid 1, the order number of the unnamed rule, and bool_var true for 10 and false for -5. errorcode and errorlevel are null, ruleid and errorcode Strings as in the manual's examples, and errorlevel Integer, the manual's default without errorlevel_vd (#1256).
define datapoint ruleset DPR_1 (variable Me_1) is
Me_1 >= 0
end datapoint ruleset;
DS_r := check_datapoint(DS_1, DPR_1 all);
| Id_1 | Id_2 | Me_1 |
|---|---|---|
| 1 | CREDIT | 10 |
| 2 | DEBIT | -5 |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{
"name": "Id_1",
"type": "Integer",
"role": "Identifier",
"nullable": false
},
{
"name": "Id_2",
"type": "String",
"role": "Identifier",
"nullable": false
},
{
"name": "Me_1",
"type": "Integer",
"role": "Measure",
"nullable": true
}
]
}
]
}
| Id_1 | Id_2 | ruleid | bool_var | errorcode | errorlevel |
|---|---|---|---|---|---|
| 1 | CREDIT | 1 | true | ||
| 2 | DEBIT | 1 | false |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{
"name": "Id_1",
"type": "Integer",
"role": "Identifier"
},
{
"name": "Id_2",
"type": "String",
"role": "Identifier"
},
{
"name": "ruleid",
"type": "String",
"role": "Identifier"
},
{
"name": "bool_var",
"type": "Boolean",
"role": "Measure"
},
{
"name": "errorcode",
"type": "String",
"role": "Measure"
},
{
"name": "errorlevel",
"type": "Integer",
"role": "Measure"
}
]
}
]
}