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?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.