10.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 On-Premises Oracle 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 |
|
|
|
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. |
|
Embedded Python Execution function |
|
See Run a Python Function on Grouped Data.
See Run a Python Function on Grouped Data with Script Owner Specified. |
|
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. |
|
Embedded Python Execution function |
|
See Run a Python Function Multiple Times.
See Run a Python Function Multiple Times with Script Owner Specified. |
|
Job status API | NA |
|
|
Job result API | NA |
|
|
Script repository |
|
See List Scripts. |
List the scripts by querying the ALL_PYQ_SCRIPTS View and the USER_PYQ_SCRIPTS View. |
Script repository |
|
NA |
|
Script repository |
See Drop a User-Defined Python Function from the Repository. |
NA |
|
Script repository |
|
NA |
NA (Scripts are loaded in the SQL APIs when the function is called.) |
Script repository | NA | NA | |
Script repository | NA | NA | |
Script repository and datastore |
|
NA |
|
Script repository and datastore |
|
NA |
|
Datastore | NA | NA | |
Datastore | NA | NA | |
Datastore | NA | NA | |
Authorization - Access Control Lists |
NA | NA |
|
Authorization - Access Control Lists |
NA | NA |
|
Authorization - Access Control Lists |
NA | NA |
|
Authorization - Tokens | NA |
See Authenticate. |
|
Authorization - Tokens | NA |
See Authenticate. |
|
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