sas_query
Run one SQL statement as PROC SQL, FedSQL, or CAS SQL against SAS libraries or caslibs, with pushdown tracing and background status handling for long-running queries.
Instructions
Run one statement from the SQL Editor as PROC SQL / FedSQL (SAS libraries) or FedSQL in CAS (caslibs).
``language``: procsql, fedsql or cas. The SQL is wrapped (proc sql; … quit; etc.); text starting with
proc / data / % runs as plain SAS code. Statements that write anywhere but WORK / CASUSER are answered with
``needs_confirmation`` (the app asks, then calls sas_execute). ``pushdown`` adds sastrace / the FedSQL plan
and returns what was sent to SingleStore with a verdict. ``history`` false: not recorded in the editor's
run history (the Schema Explorer's previews).
The run goes to the background: ``run_id`` (chosen by the app, so Stop works at once) names it,
``wait_ms`` is how long to wait for the result (default: until it's done); a run still going is answered
with ``running`` and its status (``waiting_for``: the run in another tab it waits for), and the app asks
again with sas_run_status. ``connection``: the SAS Viya connection (default: the active one).
``max_rows``: rows in the answer; ``table_rows``: rows PROC SQL keeps in the result table for paging
(sas_rows; default ``max_rows``).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| tab | No | ||
| file | No | ||
| run_id | No | ||
| tab_id | No | ||
| history | No | ||
| library | No | ||
| options | No | ||
| wait_ms | No | ||
| language | Yes | ||
| max_rows | No | ||
| pushdown | No | ||
| connection | No | ||
| table_rows | No |