← check operator page · validation/check/imbalance/manual_ex_1
pandas ✅ · DuckDB ✅
check ( DS_1 >= DS_2 imbalance DS_1 - DS_2 ) with no output, on two data sets of 12 data points.
Check, Example 1, output verbatim: the result has "the Measure imbalance that contains the specified imbalance", and "If not specified then output is all".
all 12 data points, bool_var being DS_1 >= DS_2 and imbalance DS_1 - DS_2: false with -8, -3, -25 and -15 on 2010 I, 2013 I, 2010 D and 2014 D, true with 5 on 2012 D, and true with 0 where the two are equal. errorcode and errorlevel are null, as none is given.
DS_r := check ( DS_1 >= DS_2 imbalance DS_1 - DS_2 );
| Id_1 | Id_2 | Me_1 |
|---|---|---|
| 2010 | I | 1 |
| 2011 | I | 2 |
| 2012 | I | 10 |
| 2013 | I | 4 |
| 2014 | I | 5 |
| 2015 | I | 6 |
| 2010 | D | 25 |
| 2011 | D | 35 |
| 2012 | D | 45 |
| 2013 | D | 55 |
| 2014 | D | 50 |
| 2015 | D | 75 |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Id_1", "type": "Time_Period", "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 | Me_1 |
|---|---|---|
| 2010 | I | 9 |
| 2011 | I | 2 |
| 2012 | I | 10 |
| 2013 | I | 7 |
| 2014 | I | 5 |
| 2015 | I | 6 |
| 2010 | D | 50 |
| 2011 | D | 35 |
| 2012 | D | 40 |
| 2013 | D | 55 |
| 2014 | D | 65 |
| 2015 | D | 75 |
{
"datasets": [
{
"name": "DS_2",
"DataStructure": [
{"name": "Id_1", "type": "Time_Period", "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 | bool_var | imbalance | errorcode | errorlevel |
|---|---|---|---|---|---|
| 2010 | I | false | -8 | ||
| 2011 | I | true | 0 | ||
| 2012 | I | true | 0 | ||
| 2013 | I | false | -3 | ||
| 2014 | I | true | 0 | ||
| 2015 | I | true | 0 | ||
| 2010 | D | false | -25 | ||
| 2011 | D | true | 0 | ||
| 2012 | D | true | 5 | ||
| 2013 | D | true | 0 | ||
| 2014 | D | false | -15 | ||
| 2015 | D | true | 0 |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "Time_Period", "role": "Identifier"},
{"name": "Id_2", "type": "String", "role": "Identifier"},
{"name": "bool_var", "type": "Boolean", "role": "Measure"},
{"name": "imbalance", "type": "Integer", "role": "Measure"},
{"name": "errorcode", "type": "String", "role": "Measure"},
{"name": "errorlevel", "type": "Integer", "role": "Measure"}
]
}
]
}