@sasjs/core 4.51.1 → 4.51.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base/mp_stripdiffs.sas +5 -5
- package/package.json +1 -1
package/base/mp_stripdiffs.sas
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
@li deleted rows - these are re-inserted
|
|
10
10
|
@li changed rows - differences are reverted
|
|
11
|
-
@li added rows -
|
|
11
|
+
@li added rows - marked with `_____DELETE__THIS__RECORD_____="YES"`
|
|
12
12
|
|
|
13
13
|
These changes are NOT applied to the base table - a staging dataset is
|
|
14
14
|
simply prepared for an ETL process to action. In Data Controller, this
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
in mddl_dc_difftable.sas
|
|
25
25
|
@param [out] outds= (work.mp_stripdiffs) Output table containing the diffs.
|
|
26
26
|
Has the same format as the base datset, plus a
|
|
27
|
-
`
|
|
27
|
+
`_____DELETE__THIS__RECORD_____` variable.
|
|
28
28
|
@param [in] mdebug= set to 1 to enable DEBUG messages and preserve outputs
|
|
29
29
|
|
|
30
30
|
<h4> SAS Macros </h4>
|
|
@@ -146,7 +146,7 @@ run;
|
|
|
146
146
|
|
|
147
147
|
/* join to base table for preliminary stage DS */
|
|
148
148
|
proc sql;
|
|
149
|
-
create table &outds as select "No " as
|
|
149
|
+
create table &outds as select "No " as _____DELETE__THIS__RECORD_____,
|
|
150
150
|
b.*
|
|
151
151
|
from &ds5 a
|
|
152
152
|
inner join &libds b
|
|
@@ -183,7 +183,7 @@ data _null_;
|
|
|
183
183
|
end;
|
|
184
184
|
else if move_type='A' then do;
|
|
185
185
|
if first.key_hash then do;
|
|
186
|
-
put "update &outds set
|
|
186
|
+
put "update &outds set _____DELETE__THIS__RECORD_____='Yes' where 1=1 "@@;
|
|
187
187
|
end;
|
|
188
188
|
/* gating if - as only need PK now */
|
|
189
189
|
if is_pk=1;
|
|
@@ -194,7 +194,7 @@ data _null_;
|
|
|
194
194
|
end;
|
|
195
195
|
else if move_type='D' then do;
|
|
196
196
|
if first.key_hash then do;
|
|
197
|
-
put "insert into &outds set
|
|
197
|
+
put "insert into &outds set _____DELETE__THIS__RECORD_____='No' " @@;
|
|
198
198
|
end;
|
|
199
199
|
put " ," tgtvar_nm '=' @@;
|
|
200
200
|
charval=quote(cats(oldval_char));
|
package/package.json
CHANGED