Executes arbitrary programs inside the SAS Embedded Process for Spark. This action enables the submission of plain text Scala programs or Scala programs stored in a local file for execution within the Spark environment defined by the specified caslib.
| Parameter | Description |
|---|---|
| caslib | Specifies the caslib containing the data source options. Alias: datasourceFromCasLib. (Required) |
| program | Specifies the plain text arbitrary Scala program that is executed inside Spark using the SAS Embedded Process. |
| programFile | Specifies a local file name containing an arbitrary Scala program that is submitted for execution inside Spark using the SAS Embedded Process. |
Establish a connection to the CAS server.
| 1 | cas mySession sessopts=(caslib="casuser"); |
| 2 | LIBNAME casuser cas caslib="casuser"; |
| 3 |
Executes a simple Scala print command directly within the Spark Embedded Process associated with the 'sparkLib' caslib.
| 1 | |
| 2 | PROC CAS; |
| 3 | sparkEmbeddedProcess.executeProgram / caslib="sparkLib" program="println(\"Hello from Spark EP\")"; |
| 4 | |
| 5 | RUN; |
| 6 |
Executes a Scala program stored in a local file named 'complex_logic.scala' within the Spark Embedded Process.
| 1 | |
| 2 | PROC CAS; |
| 3 | sparkEmbeddedProcess.executeProgram / caslib="sparkLib" programFile="/path/to/complex_logic.scala"; |
| 4 | |
| 5 | RUN; |
| 6 |