Test dates for matching data with metadata
peterdesmet opened this issue Β· comments
Data will be matched to receivers using receiver_id
and date_time
. Errors or missing information in the metadata can cause errors though. Here are a number of test cases and the predicted output. We'll have to review if this is adequate enough.
Receiver only deployed once
Test date: 2012-06-30
-
a-single
: 2012-07-01 / 2014-07-09 β No match -
b-single
: 2012-07-01 / null β No match -
c-single
: null / 2014-07-09 β Match before -
d-single
: 2014-07-09 / 2012-07-01 (error in metadata) β No match -
e-single
: null / null β Match
Test date: 2013-01-01
-
a-single
: 2012-07-01 / 2014-07-09 β Match between -
b-single
: 2012-07-01 / null β Match after -
c-single
: null / 2014-07-09 β Match before -
d-single
: 2014-07-09 / 2012-07-01 (error in metadata) β No match -
e-single
: null / null β Match
Test date: 2014-07-10
-
a-single
: 2012-07-01 / 2014-07-09 β No match -
b-single
: 2012-07-01 / null β Match after -
c-single
: null / 2014-07-09 β No match -
d-single
: 2014-07-09 / 2012-07-01 (error in metadata) β No match -
e-single
: null / null β Match
Receiver deployed two times
Test date: 2012-06-30
-
a-double
: 2012-01-01 / 2012-06-29, 2012-07-01 / 2014-07-09 β No match (between pairs) -
b-double
: null / 2012-06-29, 2012-07-01 / null β No match -
c-double
: null / 2012-07-01, 2012-06-29 / null (error in metadata) β Match for both -
d-double
: 2012-01-01 / null, null / 2014-07-09 (missing info in metadata) β Match between both -
e-double
: null / 2012-06-29, null / 2014-07-09 (missing info in metadata) β Match before second -
f-double
: 2012-01-01 / null, 2012-07-01 / null (missing info in metadata) β Match after first -
g-double
: null / null, null / null (missing info in metadata) β Match for both
Test date: 2013-01-01
-
a-double
: 2012-01-01 / 2012-06-29, 2012-07-01 / 2014-07-09 β Match between second pair -
b-double
: null / 2012-06-29, 2012-07-01 / null β Match after second -
c-double
: null / 2012-07-01, 2012-06-29 / null (error in metadata) β Match after second -
d-double
: 2012-01-01 / null, null / 2014-07-09 (missing info in metadata) β Match between both -
e-double
: null / 2012-06-29, null / 2014-07-09 (missing info in metadata) β Match before second -
f-double
: 2012-01-01 / null, 2012-07-01 / null (missing info in metadata) β Match after both -
g-double
: null / null, null / null (missing info in metadata) β Match for both
Test date: 2014-07-10
-
a-double
: 2012-01-01 / 2012-06-29, 2012-07-01 / 2014-07-09 β No match -
b-double
: null / 2012-06-29, 2012-07-01 / null β Match after second -
c-double
: null / 2012-07-01, 2012-06-29 / null (error in metadata) β Match after second -
d-double
: 2012-01-01 / null, null / 2014-07-09 (missing info in metadata) β Match after first -
e-double
: null / 2012-06-29, null / 2014-07-09 (missing info in metadata) β No match -
f-double
: 2012-01-01 / null, 2012-07-01 / null (missing info in metadata) β Match after both -
g-double
: null / null, null / null (missing info in metadata) β Match for both
I created an SQL querie that passes the test, but we'll have to discuss if those results are what we actually want.