Modifying Metadata

The Metadata node can be used to modify attributes exported by Enterprise Miner nodes. However, you can also modify the metadata programmatically in your extension node's code. This is done by specifying DATA step statements that Enterprise Miner uses to change the metadata exported by the node. The macro variable, &EM_ FILE _CDELTA_TRAIN, resolves to the filename containing the code. For example, you might want to reject an input variable.
filename x “&EM_FILE_CDELTA_TRAIN;
data _null_;
file x;
put ‘if upcase(NAME) = “variable-name” then ROLE=”REJECTED”;’;
run;
The code above is writing a SAS DATA step to the file specified by &EM_FILE_CDELTA. You can also use the %EM_METACHANGE macro to perform the same action.
%EM_METACHANGE(name=variable-name, role=REJECTED);
%EM_METACHANGE writes SAS DATA step statements to the same file. You can also modify other attributes such as ROLE, LEVEL, ORDER, COMMENT, LOWERLIMIT, UPPERLIMIT, or DELETE. When DELETE equals Y, the variable is removed from the metadata data set even if the variable is still in the exported data set. This provides a way to hide variables. Since both methods result in SAS code being written to a file, that code can be exported and used outside of the SAS Enterprise Miner environment.