10.3.3 ALL_PYQ_SCRIPTS View

The ALL_PYQ_SCRIPTS view contains information about the user-defined Python functions in the OML4Py script repository that are available to the current user.

Column Datatype Null Description
OWNER VARCHAR2(256) NULL permitted The owner of the user-defined Python function.
NAME VARCHAR2(128) NULL permitted The name of the user-defined Python function.
SCRIPT CLOB NULL permitted The user-defined Python function.

Example 10-3 Selecting from the ALL_PYQ_SCRIPTS View

This example selects the owner and the name of the user-defined Python function from the ALL_PYQ_SCRIPTS view.

SELECT owner, name FROM ALL_PYQ_SCRIPTS;

OWNER      NAME
--------   -----------------
OML_USER   create_iris_table
OML_USER   tmpqfun2
PYQSYS     tmpqfun2

This example selects the name of the user-defined Python function and the function definition from the view.

SELECT name, script FROM ALL_PYQ_SCRIPTS WHERE name = 'create_iris_table';

NAME                SCRIPT
-----------------   ---------------------------------------------------------------------
create_iris_table   "def create_iris_table():  from sklearn.datasets import load_iris ...