11.1.1 Comparison of the Embedded Python Execution APIs
The table below compares the four Embedded Python Execution APIs.
The APIs are:
- Embedded Python Execution API
- REST API for Embedded Python Execution (for use with Oracle Autonomous Database)
- SQL API for Embedded Python Execution with Oracle Autonomous Database.
The APIs share many functions, but they differ in some ways because of the different environments. For example, the APIs available for Autonomous Database provide an API for operating in a web environment.
The procedures and functions are part of the PYQSYS
and
SYS
schemas.
Category | Python API for Embedded Python Execution | REST API for Embedded Python Execution | SQL APIs for Embedded Python Execution |
---|---|---|---|
Embedded Python Execution function |
|
|
pyqEval Function (Autonomous Database) (Autonomous Database) |
Embedded Python Execution function |
See Run a User-Defined Python Function on the Specified Data. |
See Run a Python Function on Specified Data.
See Run a Python Function on Specified Data with Script Owner Specified. |
pyqTableEval Function (Autonomous Database) (Autonomous Database) |
Embedded Python Execution function |
|
See Run a Python Function on Grouped Data.
See Run a Python Function on Grouped Data with Script Owner Specified. |
pyqGroupEval Function (Autonomous Database) (Autonomous Database) |
Embedded Python Execution function |
|
See Run a Python Function on Chunks of Rows.
See Run a Python Function on Chunks of Rows with Script Owner Specified. |
pyqRowEval Function (Autonomous Database) (Autonomous Database) |
Embedded Python Execution function |
|
See Run a Python Function Multiple Times.
See Run a Python Function Multiple Times with Script Owner Specified. |
pyqIndexEval Function (Autonomous Database) (Autonomous Database) |
Job status API | NA |
|
pyqJobStatus Function (Autonomous Database) |
Job result API | NA |
|
pyqJobResult Function (Autonomous Database) |
Script repository |
|
See List Scripts. |
List the scripts by querying the ALL_PYQ_SCRIPTS View and the USER_PYQ_SCRIPTS View. |
Script repository |
|
NA |
pyqScriptCreate Procedure (Autonomous Database) (Autonomous Database) |
Script repository |
See Drop a User-Defined Python Function from the Repository. |
NA |
pyqScriptDrop Procedure (Autonomous Database) (Autonomous Database) |
Script repository |
|
NA |
NA (Scripts are loaded in the SQL APIs when the function is called.) |
Script repository and datastore |
|
NA |
|
Script repository and datastore |
|
NA |
|
Authorization - Access Control Lists |
NA | NA |
pyqAppendHostACE Procedure (Autonomous Database) |
Authorization - Access Control Lists |
NA | NA |
pyqRemoveHostACE Procedure (Autonomous Database) |
Authorization - Access Control Lists |
NA | NA |
pyqGetHostACE Function (Autonomous Database) |
Authorization - Tokens | NA |
See Authenticate. |
|
Authorization - Tokens | NA |
See Authenticate. |
pyqIsTokenSet Function (Autonomous Database) |
Note:
An output limit exists on the length function for REST API and SQL
APIs for embedded Python execution. A query on the length function with a length
of more than 5000 will result in an error with error code 1024 and the error
message "Output exceeds maximum length 5000". The limit is set on the
len()
result of the returning python object. For example,
len()
of a pandas.DataFrame is the number of rows,
len()
of a list is the length of the list, etc. If
pandas.DataFrame is returned, it cannot have more than 5000 rows. If a list is
returned, it should not contain more than 5000 items. This limit can be extended
by updating the OML_OUTPUT_SZLIMIT
in a
%script
paragraph:
%script
EXEC sys.pyqconfigset('OML_OUTPUT_SZLIMIT', '8000')
Parent topic: About Embedded Python Execution