-
Notifications
You must be signed in to change notification settings - Fork 48
/
check_etl.sql
63 lines (56 loc) · 972 Bytes
/
check_etl.sql
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
-- -----------------------------------------------------------------------------
-- File created - January-13-2018
-- ----------------------------------------------------------------------------
-- --------------------------------------------------
-- Need to install pgTAP
-- http://pgtap.org/
-- --------------------------------------------------
BEGIN;
SELECT plan ( 3 );
SELECT results_eq
(
'
select 0::integer;
'
,
'
select count(1)::integer from (
SELECT count(1)::integer
FROM omop.note_nlp
group by note_nlp_id
having count(1) > 1) as t;
'
,
'primary key checker'
);
SELECT results_eq
(
'
select 0::integer;
'
,
'
SELECT count(1)::integer
FROM omop.note_nlp
where section_source_concept_id = 0;
'
,
'source concept described'
);
SELECT results_eq
(
'
select 0::integer;
'
,
'
SELECT count(1)::integer
FROM omop.note_nlp
where section_concept_id = 0;
'
,
'source concept described'
);
SELECT pass( 'Note Nlp pass, w00t!' );
SELECT * FROM finish();
ROLLBACK;