This stored procedure is deprecated and it may be removed in the next major version of the Denodo Platform. Use the procedure GET_PRIMARY_KEYS instead of this one because “GET_PRIMARY_KEYS” can search on any database, not just in the one you are connected to and it returns the same information.
The section Features Deprecated in Denodo Platform 8.0 lists all the features that are deprecated.
The stored procedure
CATALOG_PKS returns the list of fields that
make up the primary key of a view, or of all the views of a database.
input_view_name : text
input_view_name(optional): name of the view for which you want to obtain the list of primary key fields. You need to be connected to the database of this view.
null, it returns the list of primary key fields of all the views of the database that you are currently connected to.
The procedure returns one row per field that makes up the primary key of each view. The output schema has the following fields:
database_name: database that the view belongs to.
view_name: name of the view.
column_name: field name of the primary key.
pk_name: the name of the primary key. This is the name of the view followed by “_pk”.
The procedure only returns information about the views over which the user has the Metadata privilege.
Let us say that there is a view
order_line whose primary key is made
up of the fields
If you execute the following query:
SELECT database_name, view_name, column_name, pk_name
WHERE input_view_name = 'order_line';
The result will be this: