|
17 | 17 | SELECT cat_test_id, |
18 | 18 | schema_name AS schema_name, |
19 | 19 | table_name AS table_name, |
20 | | - TRIM(UNNEST(STRING_TO_ARRAY(column_name, ','))) as column_name |
| 20 | + TRIM(TRIM(UNNEST(STRING_TO_ARRAY(column_name, ','))), '{ID_SEPARATOR}') as column_name |
21 | 21 | FROM test_definitions d |
22 | 22 | INNER JOIN test_types t |
23 | 23 | ON d.test_type = t.test_type |
|
26 | 26 | AND t.test_scope = 'referential' |
27 | 27 | AND t.test_type NOT LIKE 'Aggregate_%' |
28 | 28 | UNION |
29 | | - -- FROM: groupby_names (should be referential) |
| 29 | + -- FROM: groupby_names |
30 | 30 | SELECT cat_test_id, |
31 | 31 | schema_name AS schema_name, |
32 | 32 | table_name AS table_name, |
33 | | - TRIM(UNNEST(STRING_TO_ARRAY(groupby_names, ','))) as column_name |
| 33 | + TRIM(TRIM(UNNEST(STRING_TO_ARRAY(groupby_names, ','))), '{ID_SEPARATOR}') as column_name |
34 | 34 | FROM test_definitions d |
35 | 35 | INNER JOIN test_types t |
36 | 36 | ON d.test_type = t.test_type |
37 | 37 | WHERE test_suite_id = :TEST_SUITE_ID |
38 | 38 | AND COALESCE(test_active, 'Y') = 'Y' |
39 | | - AND t.test_scope IN ('column', 'referential') |
| 39 | + AND t.test_scope IN ('column', 'referential', 'table') |
40 | 40 | UNION |
41 | 41 | -- FROM: window_date_column (referential) |
42 | 42 | SELECT cat_test_id, |
43 | 43 | schema_name AS schema_name, |
44 | 44 | table_name AS table_name, |
45 | | - TRIM(UNNEST(STRING_TO_ARRAY(window_date_column, ','))) as column_name |
| 45 | + TRIM(TRIM(UNNEST(STRING_TO_ARRAY(window_date_column, ','))), '{ID_SEPARATOR}') as column_name |
46 | 46 | FROM test_definitions d |
47 | 47 | INNER JOIN test_types t |
48 | 48 | ON d.test_type = t.test_type |
|
54 | 54 | SELECT cat_test_id, |
55 | 55 | match_schema_name AS schema_name, |
56 | 56 | match_table_name AS table_name, |
57 | | - TRIM(UNNEST(STRING_TO_ARRAY(match_column_names, ','))) as column_name |
| 57 | + TRIM(TRIM(UNNEST(STRING_TO_ARRAY(match_column_names, ','))), '{ID_SEPARATOR}') as column_name |
58 | 58 | FROM test_definitions d |
59 | 59 | INNER JOIN test_types t |
60 | 60 | ON d.test_type = t.test_type |
|
67 | 67 | SELECT cat_test_id, |
68 | 68 | match_schema_name AS schema_name, |
69 | 69 | match_table_name AS table_name, |
70 | | - TRIM(UNNEST(STRING_TO_ARRAY(match_groupby_names, ','))) as column_name |
| 70 | + TRIM(TRIM(UNNEST(STRING_TO_ARRAY(match_groupby_names, ','))), '{ID_SEPARATOR}') as column_name |
71 | 71 | FROM test_definitions d |
72 | 72 | INNER JOIN test_types t |
73 | 73 | ON d.test_type = t.test_type |
|
0 commit comments