fix(derived): only the delete marker is a reserved name
A table's metadata columns are named per table - VAR_TXFROM, VAR_TXTO and VAR_PROCESSED in MPE_TABLES hold those names, and they can be anything (the bitemporal demo table uses VER_FROM_DTTM and VER_TO_DTTM). When they exist they are physical columns of the target, so the engine's collision check already refuses a VAR_NM that matches one, whatever it is called. The hard-coded list treated three example names as special: it refused them on tables that use other names, and told the reader something untrue about what is reserved.
This commit is contained in:
1 parent
c5a8de38b3
commit
af31c36b67
2 files changed
+5
-5
No files matched your search
@@ -80,9 +80,10 @@
|
||||
|
||||
%local reserved;
|
||||
|
||||
/* the metadata columns of every Data Controller table */
|
||||
%let reserved=%str(_____DELETE__THIS__RECORD_____ TX_FROM TX_TO PROCESSED_DTTM
|
||||
VAR_TXFROM VAR_TXTO VAR_PROCESSED);
|
||||
/* the only name that has to be refused outright - the metadata columns of the
|
||||
target table are physical columns, so the engine's collision check covers
|
||||
them whatever MPE_TABLES calls them */
|
||||
%let reserved=%str(_____DELETE__THIS__RECORD_____);
|
||||
|
||||
%mp_abort(iftrue= (%length(&libds)=0 or %length(&dclib)=0)
|
||||
,mac=&sysmacroname
|
||||
|
||||
@@ -111,8 +111,7 @@ data work.derived_check;
|
||||
then reason='VAR_NM must be a valid SAS name';
|
||||
else if verify(substr(var_nm,1,1),'0123456789')=0
|
||||
then reason='VAR_NM must not start with a digit';
|
||||
else if var_nm in ('_____DELETE__THIS__RECORD_____','TX_FROM','TX_TO'
|
||||
,'PROCESSED_DTTM','VAR_TXFROM','VAR_TXTO','VAR_PROCESSED')
|
||||
else if var_nm='_____DELETE__THIS__RECORD_____'
|
||||
then reason='VAR_NM is reserved';
|
||||
else if var_type not in ('C','N')
|
||||
then reason='VAR_TYPE must be C or N';
|
||||
|
||||
Reference in new issue
Block a user