This repository was archived by the owner on May 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -36,15 +36,6 @@ pub fn get_dv_schemas() -> Vec<DVSchema> {
36
36
dv_schemas
37
37
}
38
38
39
- pub fn column_in_dv_schemas ( table_oid : u32 , column_ordinal_position : i16 ) -> bool {
40
-
41
- for dv_schema in get_dv_schemas ( ) {
42
- if dv_schema. contains_column ( table_oid, column_ordinal_position) { return true ; }
43
- }
44
-
45
- false
46
- }
47
-
48
39
// Load All DV Schemas
49
40
50
41
pub fn dv_load_schemas_all ( ) -> bool {
Original file line number Diff line number Diff line change @@ -346,6 +346,9 @@ pub fn insert_into_build_call(
346
346
t.reason,
347
347
t.category,
348
348
t.model_name,
349
+ CASE
350
+ WHEN dws.column_ordinal_position IS NOT NULL THEN true ELSE false
351
+ END AS is_dw,
349
352
MAX(
350
353
CASE
351
354
WHEN t.category = 'Business Key Part' AND t.confidence_score < cl.value THEN 1
@@ -360,12 +363,14 @@ pub fn insert_into_build_call(
360
363
) OVER (PARTITION BY s.schema_name, s.table_name) AS bkp_cnt
361
364
FROM auto_dw.source_objects AS s
362
365
JOIN confidence_level AS cl ON true
366
+ LEFT JOIN auto_dw.dw_source_objects AS dws ON s.table_oid = dws.table_oid AND s.column_ordinal_position = dws.column_ordinal_position
363
367
LEFT JOIN source_object_transformation_latest AS t ON s.pk_source_objects = t.fk_source_objects
364
368
WHERE s.current_flag = 'Y' AND s.deleted_flag = 'N'
365
369
),
366
370
source_object AS (
367
371
SELECT *,
368
372
CASE
373
+ WHEN is_dw THEN 'Built'
369
374
WHEN confidence_score IS NULL THEN 'Queued for Processing'
370
375
-- Links
371
376
WHEN category = 'Business Key Part' AND confidence_score >= cl.value AND bkp_cnt > 1 THEN 'Ready to Deploy'
You can’t perform that action at this time.
0 commit comments