feat: adding ismap attribute to getdata response (and fixing test)
Some checks failed
Build / Build-and-ng-test (pull_request) Failing after 13s
Some checks failed
Build / Build-and-ng-test (pull_request) Failing after 13s
This commit is contained in:
parent
56264ecc69
commit
2702bb3c84
@ -14,8 +14,9 @@
|
||||
<h5> sasdata </h5>
|
||||
<h5> sasparams </h5>
|
||||
Contains info on the request. One row is returned.
|
||||
* CLS_FLG - set to 0 if there are no CLS rules (everything should be editable)
|
||||
@li CLS_FLG - set to 0 if there are no CLS rules (everything should be editable)
|
||||
else set to 1 (CLS rules exist)
|
||||
@li ISMAP - set to 1 if the target DS is an excel map target, else 0
|
||||
|
||||
<h5> approvers </h5>
|
||||
<h5> dqrules </h5>
|
||||
@ -534,6 +535,11 @@ data _null_;
|
||||
run;
|
||||
|
||||
%put params;
|
||||
%let ismap=0;
|
||||
proc sql noprint;
|
||||
select count(*) into: ismap from &mpelib..mpe_excel_map
|
||||
where xlmap_id="&orig_libds";
|
||||
|
||||
data sasparams;
|
||||
length colHeaders $20000 filter_text $32767;
|
||||
colHeaders=cats(upcase("%mf_getvarlist(sasdata1,dlm=%str(,))"));
|
||||
@ -551,8 +557,11 @@ data sasparams;
|
||||
if %mf_nobs(work.cls_rules)=0 then cls_flag=0;
|
||||
else cls_flag=1;
|
||||
put (_all_)(=);
|
||||
if "&orig_libds"="&mpelib..MPE_EXCEL_UPLOAD" or &ismap ne 0 then ismap=1;
|
||||
else ismap=0;
|
||||
run;
|
||||
|
||||
|
||||
/* Extract validation DQ Rules */
|
||||
proc sort data=&mpelib..mpe_validations
|
||||
(where=(&dc_dttmtfmt. le TX_TO
|
||||
|
@ -141,13 +141,15 @@ run;
|
||||
data work.fmts;
|
||||
length fmtname $32;
|
||||
fmtname="&fmtname";
|
||||
type='N';
|
||||
do start=1 to 10;
|
||||
label= cats("&fmtname",start);
|
||||
end=start;
|
||||
output;
|
||||
end;
|
||||
run;
|
||||
proc sort data=work.fmts nodupkey;
|
||||
by fmtname;
|
||||
by fmtname type start;
|
||||
run;
|
||||
proc format cntlin=work.fmts library=dctest.dcfmts;
|
||||
run;
|
||||
@ -157,8 +159,9 @@ data work.inquery3;
|
||||
infile datalines4 dsd;
|
||||
input GROUP_LOGIC:$3. SUBGROUP_LOGIC:$3. SUBGROUP_ID:8. VARIABLE_NM:$32.
|
||||
OPERATOR_NM:$10. RAW_VALUE:$4000.;
|
||||
RAW_VALUE="'&fmtname'";
|
||||
datalines4;
|
||||
AND,AND,1,FMTNAME,CONTAINS,"'&fmtname'"
|
||||
AND,AND,1,FMTNAME,CONTAINS,placeholder (see line above)
|
||||
;;;;
|
||||
run;
|
||||
%mp_filterstore(
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
@file getxlmaps.sas
|
||||
@brief Returns a list of rules for a specific xlmap_id
|
||||
@brief Returns a list of rules and other info for a specific xlmap_id
|
||||
|
||||
<h4> Service Inputs </h4>
|
||||
|
||||
@ -14,11 +14,20 @@
|
||||
|
||||
<h5> xlmaprules </h5>
|
||||
|
||||
Filtered output of the dc.mpe_excel_map table
|
||||
|
||||
|XLMAP_ID|XLMAP_RANGE_ID|XLMAP_SHEET|XLMAP_START|XLMAP_FINISH|
|
||||
|---|---|---|---|---|
|
||||
|Sample|Range1|Sheet1|ABSOLUTE A1| |
|
||||
|Sample|Range2|Sheet1|RELATIVE R[2]C[2]|ABSOLUTE H11|
|
||||
|
||||
<h5> xlmapinfo </h5>
|
||||
Extra info for a map id
|
||||
|
||||
|TARGET_DS|
|
||||
|---|
|
||||
|DCXXX.MPE_EXCEL_UPLOAD|
|
||||
|
||||
<h4> SAS Macros </h4>
|
||||
@li mp_abort.sas
|
||||
@li mpeinit.sas
|
||||
@ -50,7 +59,22 @@ create table work.xlmaprules as
|
||||
,msg=%str(syscc=&syscc)
|
||||
)
|
||||
|
||||
%let chk=0;
|
||||
proc sql noprint;
|
||||
select count(*) into: chk
|
||||
from &mpelib..mpe_tables
|
||||
where catx('.',libref,dsn) in (select xlmap_id from work.getxlmaps_in);
|
||||
|
||||
data work.xlmapinfo;
|
||||
set work.getxlmaps_in;
|
||||
length target_ds $32;
|
||||
if &chk=0 then target_ds="&mpelib..MPE_EXCEL_UPLOAD";
|
||||
else target_ds=xlmap_id;
|
||||
keep target_ds;
|
||||
run;
|
||||
|
||||
%webout(OPEN)
|
||||
%webout(OBJ,xlmaprules)
|
||||
%webout(OBJ,xlmapinfo)
|
||||
%webout(CLOSE)
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
<h4> SAS Macros </h4>
|
||||
@li mf_getuniquefileref.sas
|
||||
@li mx_testservice.sas
|
||||
@li mp_assert.sas
|
||||
@li mp_assertdsobs.sas
|
||||
|
||||
|
||||
@ -41,3 +42,17 @@ run;
|
||||
outds=work.test_results
|
||||
)
|
||||
|
||||
|
||||
/**
|
||||
* Test 2 - info returned
|
||||
*/
|
||||
data work.xlmapinfo;
|
||||
set web1.xlmapinfo;
|
||||
putlog (_all_)(=);
|
||||
call symputx('tgtds',target_ds);
|
||||
run;
|
||||
%mp_assert(
|
||||
iftrue=(&tgtds=&dclib..MPE_EXCEL_UPLOAD),
|
||||
desc=Checking correct target table is returned,
|
||||
outds=work.test_results
|
||||
)
|
Loading…
Reference in New Issue
Block a user