Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit bbc34ad

Browse files
committed
feat (PADW-115): Add Incremental Build
1 parent a572058 commit bbc34ad

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

extension/src/controller/dv_loader.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,6 @@ pub fn get_dv_schemas() -> Vec<DVSchema> {
3636
dv_schemas
3737
}
3838

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-
4839
// Load All DV Schemas
4940

5041
pub fn dv_load_schemas_all() -> bool {

extension/src/model/queries.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,9 @@ pub fn insert_into_build_call(
346346
t.reason,
347347
t.category,
348348
t.model_name,
349+
CASE
350+
WHEN dws.column_ordinal_position IS NOT NULL THEN true ELSE false
351+
END AS is_dw,
349352
MAX(
350353
CASE
351354
WHEN t.category = 'Business Key Part' AND t.confidence_score < cl.value THEN 1
@@ -360,12 +363,14 @@ pub fn insert_into_build_call(
360363
) OVER (PARTITION BY s.schema_name, s.table_name) AS bkp_cnt
361364
FROM auto_dw.source_objects AS s
362365
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
363367
LEFT JOIN source_object_transformation_latest AS t ON s.pk_source_objects = t.fk_source_objects
364368
WHERE s.current_flag = 'Y' AND s.deleted_flag = 'N'
365369
),
366370
source_object AS (
367371
SELECT *,
368372
CASE
373+
WHEN is_dw THEN 'Built'
369374
WHEN confidence_score IS NULL THEN 'Queued for Processing'
370375
-- Links
371376
WHEN category = 'Business Key Part' AND confidence_score >= cl.value AND bkp_cnt > 1 THEN 'Ready to Deploy'

0 commit comments

Comments
 (0)