fix: improvements to validations
This commit is contained in:
@@ -1866,6 +1866,15 @@ insert into &lib..MPE_VALIDATIONS set
|
||||
,rule_value='0'
|
||||
,rule_active=1
|
||||
,tx_to='31DEC5999:23:59:59'dt;
|
||||
insert into &lib..MPE_VALIDATIONS set
|
||||
tx_from=0
|
||||
,base_lib="&lib"
|
||||
,base_ds="MPE_ROW_LEVEL_SECURITY"
|
||||
,base_col="RLS_SUBGROUP_ID"
|
||||
,rule_type='NOTNULL'
|
||||
,rule_value='0'
|
||||
,rule_active=1
|
||||
,tx_to='31DEC5999:23:59:59'dt;
|
||||
insert into &lib..MPE_VALIDATIONS set
|
||||
tx_from=0
|
||||
,base_lib="&lib"
|
||||
|
||||
@@ -124,7 +124,8 @@
|
||||
"serviceFolders": [
|
||||
"sasjs/targets/viya/services_viya/viya_users",
|
||||
"sasjs/targets/viya/services_viya/admin",
|
||||
"sasjs/targets/viya/services_viya/public"
|
||||
"sasjs/targets/viya/services_viya/public",
|
||||
"sasjs/targets/viya/services_viya/validations"
|
||||
],
|
||||
"initProgram": "sasjs/utils/serviceinitviya.sas",
|
||||
"termProgram": "",
|
||||
|
||||
@@ -122,10 +122,16 @@ run;
|
||||
table.tableExists result=r2 / name="COUNTRIES" caslib="PUBLIC";
|
||||
if r2.exists then
|
||||
table.dropTable / name="COUNTRIES" caslib="PUBLIC" quiet=TRUE;
|
||||
|
||||
table.tableExists result=r2 / name="MPE_AUDIT" caslib="PUBLIC";
|
||||
if r2.exists then
|
||||
table.dropTable / name="MPE_AUDIT" caslib="PUBLIC" quiet=TRUE;
|
||||
quit;
|
||||
proc casutil;
|
||||
load data=work.CARS_EXT outcaslib="PUBLIC" casout="CARS_EXT" promote;
|
||||
load data=work.COUNTRIES outcaslib="PUBLIC" casout="COUNTRIES" promote;
|
||||
load data=&dc_libref..MPE_AUDIT
|
||||
outcaslib="PUBLIC" casout="MPE_AUDIT" promote;
|
||||
run;
|
||||
data &joblib..JOBDATA; set work.JOBDATA;run;
|
||||
%end;
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
%let vartgtlib=%mf_getuniquename();
|
||||
%let var_is_lib=%mf_getuniquename();
|
||||
data _null_;
|
||||
length &varlibds $41 &vartgtlib $8 libref $8 rls_libref $8;
|
||||
length &varlibds $41 &vartgtlib $8 libref $8 rls_libref cls_libref $8;
|
||||
if _n_=1 then call missing(of _all_);
|
||||
set work.source_row;
|
||||
&varlibds=upcase(symget('libds'));
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
@file
|
||||
@brief validating the mpe_security.sas_group column
|
||||
@details The input table is simply one row from the target table in table
|
||||
called "work.source_row".
|
||||
|
||||
Available macro variables:
|
||||
@li LIBDS - The library.dataset being filtered
|
||||
@li VARIABLE_NM - The column being filtered
|
||||
|
||||
|
||||
<h4> Service Outputs </h4>
|
||||
The values provided below are generic samples - we encourage you to replace
|
||||
these with realistic values in your own deployments.
|
||||
|
||||
<h5>DYNAMIC_VALUES</h5>
|
||||
The RAW_VALUE column may be charactor or numeric. If DISPLAY_INDEX is not
|
||||
provided, it is added automatically.
|
||||
|
||||
|DISPLAY_INDEX:best.|DISPLAY_VALUE:$|RAW_VALUE|
|
||||
|---|---|---|
|
||||
|1|$77.43|77.43|
|
||||
|2|$88.43|88.43|
|
||||
|
||||
<h5>DYNAMIC_EXTENDED_VALUES</h5>
|
||||
This table is optional. If provided, it will map the DISPLAY_INDEX from the
|
||||
DYNAMIC_VALUES table to additional column/value pairs, that will be used to
|
||||
populate dropdowns for _other_ cells in the _same_ row.
|
||||
|
||||
Should be used sparingly! The use of large tables here can slow down the
|
||||
browser.
|
||||
|
||||
|DISPLAY_INDEX:best.|EXTRA_COL_NAME:$32.|DISPLAY_VALUE:$|DISPLAY_TYPE:$1.|RAW_VALUE_NUM|RAW_VALUE_CHAR:$5000|
|
||||
|---|---|---|
|
||||
|1|DISCOUNT_RT|"50%"|N|0.5||
|
||||
|1|DISCOUNT_RT|"40%"|N|0.4||
|
||||
|1|DISCOUNT_RT|"30%"|N|0.3||
|
||||
|1|CURRENCY_SYMBOL|"GBP"|C||"GBP"|
|
||||
|1|CURRENCY_SYMBOL|"RSD"|C||"RSD"|
|
||||
|2|DISCOUNT_RT|"50%"|N|0.5||
|
||||
|2|DISCOUNT_RT|"40%"|N|0.4||
|
||||
|2|CURRENCY_SYMBOL|"EUR"|C||"EUR"|
|
||||
|2|CURRENCY_SYMBOL|"HKD"|C||"HKD"|
|
||||
|
||||
|
||||
|
||||
<h4> SAS Macros </h4>
|
||||
@li dc_getgroups.sas
|
||||
|
||||
|
||||
**/
|
||||
|
||||
|
||||
%dc_getgroups(outds=groups)
|
||||
|
||||
proc sql;
|
||||
create table work.DYNAMIC_VALUES as
|
||||
select distinct groupname as display_value,
|
||||
groupuri as raw_value
|
||||
from work.groups
|
||||
order by 1;
|
||||
Reference in New Issue
Block a user