BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ullsokk
Pyrite | Level 9

I have a simple code snippet I want to run in the SAS code node in VDMML, that removes varaibles with given suffixes. Here is my code:

proc contents noprint data=&dm_data out = contents (keep=name) ;
run;


data contents;
	set contents ;
	if index(lowcase(name),'_dt') then drop=1 ;
	if index(lowcase(name),'_rk') then drop=1 ;
	if index(lowcase(name),'_dttm') then drop=1 ;
run ; 
	
proc sql;
	select name into: dropvars separated by ' ' from contents where drop = 1;
	quit;

data &dm_data;
	set &dm_data (drop=&dropvars);
run;

The proc contents and SQL seems to work, and I get no errors in the log. The log even implies that the final dataset has 1602 variables, down 7 from the original 1609, just as expected. But the column is still there in the results view. And in the next node, the column is still visible, and populated with data.

 

Am I using the wrong macro variable name for the data? Do I need to do a CAS action? or do I have to do some metadata update?  

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ullsokk
Pyrite | Level 9
Figured out I could use the macro %dmcas_metaChange to change the role to rejected, as it seems variables cannot be dropped in the code node

View solution in original post

1 REPLY 1
Ullsokk
Pyrite | Level 9
Figured out I could use the macro %dmcas_metaChange to change the role to rejected, as it seems variables cannot be dropped in the code node

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 761 views
  • 0 likes
  • 1 in conversation