notebook_sas_python
Runs Python code as PROC PYTHON in a SAS Viya compute session, enabling notebook cells to share Python variables and WORK tables without a local kernel.
Instructions
Run a "Python in SAS" cell: the code as PROC PYTHON in the Workspace's SAS Compute session of the SAS Viya connection (default: the active one) - the SQL Editor's session, queue, pre-warm and Stop (sas_stop), so Python variables persist between cells and WORK tables are the session's; Restart SAS session (sas_session_reset) clears both. Doesn't need a local kernel. Code containing "endsubmit" is refused.
``run_id`` (chosen by the app, so Stop works at once) names the run; ``wait_ms``: how long to wait for the
result (default: until done); a run still going answers ``running`` (``python_started`` false: Python
still has to start in the session, ~8 s) and the app asks again with notebook_sas_python_status. Done:
``outputs`` (nbformat: stdout, the SAS log / ODS output, a Python exception) and ``status`` ok / error /
aborted.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | No | ||
| source | Yes | ||
| wait_ms | No | ||
| connection | No | ||
| notebook_id | No |