Altair slc running python scripts inside an slc datastep
Calling python within a slc datastep and computing the area of circles and exporting to an slc dataset.
The macro can also be used outside of an slc datastep.
Too long to post, see github
https://github.com/rogerjdeangelis/altair-slc-running-python-scripts-inside-an-slc-datastep
Drop down macro on the end of this message and in
https://github.com/rogerjdeangelis/utl-macros-used-in-many-of-rogerjdeangelis-repositories
SOAPBOX ON
Note: This solves some shortcommings of the slc proc python;
Python is much more difficult to build a code generator than R.
This is a severe limitation?
1 proc python cannot be called from a macro.
2 proc python cannot resolve macro variables.
3 You cannot save and load an entire python workspace, like you can with R
R save.image("my_workspace.RData")
load("my_workspace.RData")
4 Unfortunately this makes it impossible to call a macro that contains 'proc r'
and create a slc dataset.
5 It is more difficult to generate pyhton scripts do to python forced indenting.
6 You can output a python dataframe to a feather file and use hard coded 'proc r'
inputs and outputs to create an slc dataset. You can't even resolve
macro variables in the hardcoded 'proc r'. You can use a dyastep eith 'call execute' to create
'proc r code' with inputs and outputs, but this is really a kludge.
7 It seems that dosubl is faster in the slc then sas?
Integration with python is mission critical?
SOAPBOX OFF