Hi everyone,
I have managed to score a table with a model. I am using big tables (many rows and columns) and thus don't want to waste time on moving unnecessary data.
It appears as though the output table copies all the variables in the input table. The model only requires some of the variables from the input table. Furthermore, the output table only requires the model outcome (em_eventprobability) and an identifier.
Is there a way to specify the variables to output in the output table in order to spare the data replication. I will often be scoring tables in other databases and thus moving as little data as possible is ideal.
The CASL code I am using is as follows:
proc cas;
loadactionset "ds2";
ds2.runModel/
modelname="my_gradboost"
table={caslib="Public", name = "InputData"}
modelTable={caslib="Public", name="SAS_model_table"}
casOut={caslib="Public", name="OutputData"};
run;
Thanks in advance.
Kind Regards,
Kyle
Hi @Kyle4,
I received further info from a colleague. He indicates that vars= will not work in this situation as the runModel action doesn’t do the actual I/O when the DS2 program is run.
He also says The DROP and KEEP DS2 statements and the DROP= and KEEP= table options all should work as expected if specified in the DS2 program.
Finally, he mentions, In lieu of the vars= parameter, would creating a CAS view on the input table help in this situation?
Hope this helps.
Join us for SAS Community Trivia
SAS Bowl L, PROC HTTP
Wednesday, February 19, 2024, at 10:00 a.m. ET | #SASBowl
Hi @Kyle4,
I've forwarded this inquiry on internally. We'll get back to you soon.
Thanks!
Join us for SAS Community Trivia
SAS Bowl L, PROC HTTP
Wednesday, February 19, 2024, at 10:00 a.m. ET | #SASBowl
Hi @Kyle4,
I received this input from a colleague of mine. Hope it helps!
A thought is to try the vars= parameter on the input table (table={caslib="public" name="inputdata" vars={"var1" "var2" "var3"}}).
Another is using a DROP or KEEP statement or table option in the DS2 code, if you have access to the code.
Thanks,
Joe
Join us for SAS Community Trivia
SAS Bowl L, PROC HTTP
Wednesday, February 19, 2024, at 10:00 a.m. ET | #SASBowl
Hi @Kyle4,
I received further info from a colleague. He indicates that vars= will not work in this situation as the runModel action doesn’t do the actual I/O when the DS2 program is run.
He also says The DROP and KEEP DS2 statements and the DROP= and KEEP= table options all should work as expected if specified in the DS2 program.
Finally, he mentions, In lieu of the vars= parameter, would creating a CAS view on the input table help in this situation?
Hope this helps.
Join us for SAS Community Trivia
SAS Bowl L, PROC HTTP
Wednesday, February 19, 2024, at 10:00 a.m. ET | #SASBowl
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.