fix: ensuring version history only includes loaded versions
Build / Build-and-ng-test (pull_request) Failing after 48s Details

This commit is contained in:
^ 2024-03-26 14:25:58 +00:00
parent c6595c1f61
commit 51ebd25aa3
2 changed files with 12 additions and 9 deletions

View File

@ -16,17 +16,19 @@
proc sql;
create table &outds as
select a.csv_dir as LOAD_REF
,a.user_nm
,put(a.processed_dttm,datetime19.) as VERSION_DTTM
,a.reason_txt as VERSION_DESC
select a.table_id as LOAD_REF
,a.reviewed_by_nm as user_nm
,a.reviewed_on_dttm as version_dttm_num
,put(a.reviewed_on_dttm,datetime19.) as VERSION_DTTM
,a.submitted_reason_txt as VERSION_DESC
,b.changed_records
,b.new_records
,b.deleted_records
from &dclib..mpe_loads a
from &dclib..mpe_submit a
left join &dclib..MPE_DATALOADS(where=(libref="&libref" & dsn="&ds")) b
on a.csv_dir=b.etlsource
where a.approvals="&libref..&ds" and a.status='SUCCESS'
order by a.processed_dttm desc;
on a.table_id=b.etlsource
where a.base_lib="&libref" and a.base_ds="&ds"
and a.submit_status_cd='APPROVED' and a.num_of_approvals_remaining=0
order by a.reviewed_on_dttm desc;
%mend mpe_getversions;

View File

@ -121,7 +121,8 @@ insert into &mpelib..mpe_loads
set USER_NM="&user"
,STATUS='IN PROGRESS'
,CSV_dir="&mperef"
,PROCESSED_DTTM=&now;
,PROCESSED_DTTM=&now
,reason_txt = symget('submitted_reason_txt');
/* import CSV */