← check_hierarchy operator page · validation/check_hierarchy/condition/conditioning_value_domain_bound
pandas ✅ · DuckDB ✅
HR_3, the rule of HR_2 on the value domains VD_C and VD_1, R1 : when VD_C = 2 then A = B, bound with condition Id_1 rule Id_2, with the default mode, input and output.
Check hierarchy: "If hr is defined on Value Domains then it is mandatory to specify the condition (if any in the ruleset hr) and the rule parameters", whose Components "must take values on the Value Domains corresponding, in positional order, to the ones specified in the condition and rule parameter of hr".
the output of Conditioning variable named: (2, A, R1), 7 = 4 being false, with Me_1 7 and imbalance 3, as Id_1 1 fails the condition. VD_1 holds the 26 uppercase letters of the manual's Example 1 and VD_C the values 1 and 2 of Id_1; imbalance, left minus right, is a Number like Me_1, and the null errorlevel Integer, the manual's default without errorlevel_vd (#1256).
define hierarchical ruleset HR_3 ( valuedomain condition VD_C rule VD_1 ) is
R1 : when VD_C = 2 then A = B
end hierarchical ruleset;
DS_r := check_hierarchy ( DS_1, HR_3 condition Id_1 rule Id_2 );
| Id_1 | Id_2 | Me_1 |
|---|---|---|
| 1 | A | 5 |
| 1 | B | 2 |
| 2 | A | 7 |
| 2 | B | 4 |
{
"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": "Number", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Id_2 | ruleid | Me_1 | imbalance | errorcode | errorlevel |
|---|---|---|---|---|---|---|
| 2 | A | R1 | 7 | 3 |
{
"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": "Me_1", "type": "Number", "role": "Measure"},
{"name": "imbalance", "type": "Number", "role": "Measure"},
{"name": "errorcode", "type": "String", "role": "Measure"},
{"name": "errorlevel", "type": "Integer", "role": "Measure"}
]
}
]
}
{
"name": "VD_1",
"setlist": [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z"
],
"type": "String"
}
{
"name": "VD_C",
"setlist": [
1,
2
],
"type": "Integer"
}