Skip to content

Commit

Permalink
fix: addressing bug with non-unique PK for reverting multiple loads a…
Browse files Browse the repository at this point in the history
…t once in mp_stripdiffs.sas
  • Loading branch information
^ committed Apr 29, 2024
1 parent 7413266 commit 96e8b09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions all.sas
Original file line number Diff line number Diff line change
Expand Up @@ -13505,15 +13505,15 @@ run;
%let ds3=%upcase(work.%mf_getuniquename(prefix=mpsd_keychar));
proc transpose data=&ds2(where=(tgtvar_type='C'))
out=&ds3(drop=_name_);
by KEY_HASH;
by KEY_HASH PROCESSED_DTTM;
id TGTVAR_NM;
var charval;
run;

%let ds4=%upcase(work.%mf_getuniquename(prefix=mpsd_keynum));
proc transpose data=&ds2(where=(tgtvar_type='N'))
out=&ds4(drop=_name_);
by KEY_HASH;
by KEY_HASH PROCESSED_DTTM;
id TGTVAR_NM;
var numval;
run;
Expand All @@ -13523,7 +13523,7 @@ run;

%let ds5=%upcase(work.%mf_getuniquename(prefix=mpsd_merged));
data &ds5;
length key_hash $32;
length key_hash $32 processed_dttm 8;
merge &ds3 &ds4;
by key_hash;
if not missing(key_hash);
Expand Down
6 changes: 3 additions & 3 deletions base/mp_stripdiffs.sas
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ run;
%let ds3=%upcase(work.%mf_getuniquename(prefix=mpsd_keychar));
proc transpose data=&ds2(where=(tgtvar_type='C'))
out=&ds3(drop=_name_);
by KEY_HASH;
by KEY_HASH PROCESSED_DTTM;
id TGTVAR_NM;
var charval;
run;

%let ds4=%upcase(work.%mf_getuniquename(prefix=mpsd_keynum));
proc transpose data=&ds2(where=(tgtvar_type='N'))
out=&ds4(drop=_name_);
by KEY_HASH;
by KEY_HASH PROCESSED_DTTM;
id TGTVAR_NM;
var numval;
run;
Expand All @@ -138,7 +138,7 @@ run;

%let ds5=%upcase(work.%mf_getuniquename(prefix=mpsd_merged));
data &ds5;
length key_hash $32;
length key_hash $32 processed_dttm 8;
merge &ds3 &ds4;
by key_hash;
if not missing(key_hash);
Expand Down

0 comments on commit 96e8b09

Please sign in to comment.