fix: supporting SCD2 data reversions
Build / Build-and-ng-test (pull_request) Failing after 15s Details

This commit is contained in:
^ 2024-04-30 18:39:00 +01:00
parent 904ca30f91
commit fa8396f039
3 changed files with 14 additions and 9 deletions

14
sas/package-lock.json generated
View File

@ -7,7 +7,7 @@
"name": "dc-sas",
"dependencies": {
"@sasjs/cli": "^4.11.1",
"@sasjs/core": "^4.51.6"
"@sasjs/core": "^4.52.0"
}
},
"node_modules/@coolaj86/urequest": {
@ -116,9 +116,9 @@
"integrity": "sha512-Grwydm5GxBsYk238PZw41XPjXVVQ9vWcvfZ06L2P0bQbvK0sGn7l69JA7H5MGr3QcaLpiD4Kg70cAh7PgE+JOw=="
},
"node_modules/@sasjs/core": {
"version": "4.51.6",
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.51.6.tgz",
"integrity": "sha512-aTvaD5aJZyiZtTC0NczBoRKjqm8VS82R869/nppdCkFHq8ySEFjHvfaqVHkzEpqDWMsTzplpMvGuCHygF13nig=="
"version": "4.52.0",
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.52.0.tgz",
"integrity": "sha512-r+yQYSTYdvNPJ82n2xW/rbJd/cJpk3HuFhCa49RTDlDWjXMXJlymvGB0ltv3/L8rNk4+TwoyMzb7cJYnILi6ag=="
},
"node_modules/@sasjs/lint": {
"version": "2.3.1",
@ -1834,9 +1834,9 @@
}
},
"@sasjs/core": {
"version": "4.51.6",
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.51.6.tgz",
"integrity": "sha512-aTvaD5aJZyiZtTC0NczBoRKjqm8VS82R869/nppdCkFHq8ySEFjHvfaqVHkzEpqDWMsTzplpMvGuCHygF13nig=="
"version": "4.52.0",
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.52.0.tgz",
"integrity": "sha512-r+yQYSTYdvNPJ82n2xW/rbJd/cJpk3HuFhCa49RTDlDWjXMXJlymvGB0ltv3/L8rNk4+TwoyMzb7cJYnILi6ag=="
},
"@sasjs/lint": {
"version": "2.3.1",

View File

@ -29,6 +29,6 @@
"private": true,
"dependencies": {
"@sasjs/cli": "^4.11.1",
"@sasjs/core": "^4.51.6"
"@sasjs/core": "^4.52.0"
}
}

View File

@ -55,7 +55,8 @@ select cats(base_lib,'.',base_ds) into: tgtds
where TABLE_ID="&loadref";
/* find the audit table */
select coalescec(audit_libds,"&mpelib..MPE_AUDIT") into: difftable
select coalescec(audit_libds,"&mpelib..MPE_AUDIT"), loadtype, var_txto
into: difftable, :loadtype, :txto
from &mpelib..MPE_TABLES
where libref="%scan(&tgtds,1,.)"
& dsn="%scan(&tgtds,2,.)"
@ -68,9 +69,13 @@ select coalescec(audit_libds,"&mpelib..MPE_AUDIT") into: difftable
/* assign the library */
%dc_assignlib(READ,%scan(&tgtds,1,.))
/* if the target is an SCD2 table, create a view to get current snapshot */
%let fltr=%sysfunc(ifc(&loadtype=TXTEMPORAL,&dc_dttmtfmt<&txto,1=1));
/* extract the differences to be applied */
%mp_stripdiffs(&tgtds,&loadref,&difftable
,outds=work.mp_stripdiffs
,filtervar=fltr
,mdebug=&sasjs_mdebug
)