This chapter provides information about the packages you use with the Data Marketplace Tool in Data Studio. The DBMS_DATAMART topic also covers the procedures included in the DBMS_DATAMART package. The DBMS_DATAMART package provides APIs to support common operations with Data Marketplace.
You can use Oracle Data Marketplace APIs to register and access datasets.
DBMS_DATAMART Package Subprograms
The DBMS_DATAMART package simplifies common operations with Oracle Data Marketplace, such as registering objects, requesting access, granting access, revoking access, unregistering and listing datasets.
The following table lists the DBMS_DATAMART subprograms and briefly describes them.
procedure register_object(schema_name in varchar2,
object_name in varchar2,
namespace in varchar2,
data_set_name in varchar2,
scope in clob default null,
thumbnail in blob default null,
thumbnail_url in varchar2 default null,
thumbnail_mime_type in varchar2 default null,
parameters in clob default null);
Register Object Parameters
If you are accessing Register Object procedures, use the following parameters.
Parameter
Description
schema_name
The name of the schema.
object_name
The name of the object.
namespace
The namespace for the object.
data_set_name
The name of the dataset.
scope
This parameter indicates who can remotely access the data. The scope can be set to various levels, including to the region where the database resides, to individual tenancies, or to compartments. MY$REGION is not supported.
thumbnail
The image the tool displays in the cover of a dataset. You cannot use this parameter.
thumbnail_url
You cannot specify your own thumbnail_url. Oracle provides this parameter.
thumbnail_mime_type
It specifies Multipurpose Internet Mail Extensions (MIME) type of thumbnail.
Parameters
It specifies JSON parameters such as tags, description, data_set_owner, authorization_required, offload_targets, offload_targets and store_sample.
Request Access Procedure
This procedure requests access to the specified dataset.
Syntax
procedure request_access(namespace in varchar2,
data_set_name in varchar2,
auth_info out clob);
Request Access Parameters
If you are accessing Request Access procedure, use the following parameters.
Parameter
Description
Namespace
The namespace for the object.
Dataset name
The name of the dataset.
Auth Info
This parameter is generated populated as JSON on return. If the dataset provider has provided an email address and the requesting user has set up their Data Studio SMTP settings, the request will be submitted via email and this parameter will be generated with the delivery field set to smtp. Otherwise, the delivery field will be set to browser and you must use the rest of the metadata to submit their own request over email.
Grant Access Procedure
This procedure grants access to the specified dataset. The auth info parameter must contain the Sharing ID.
Syntax
procedure grant_access(namespace in varchar2,
data_set_name in varchar2,
auth_info in clob);
Revoke Access Procedure
This procedure revokes access to the specified dataset. The auth info parameter must contain the Sharing ID.
Syntax
procedure revoke_access(namespace in varchar2,
data_set_name in varchar2,
auth_info in clob);
Unregister Procedure
This procedure revokes access to the specified dataset. The auth info parameter must contain the Sharing ID.
Syntax
procedure unregister(namespace in varchar2,
data_set_name in varchar2);
List Dataset Procedure
This procedure displays a list of datasets.
Syntax
function list_data_sets(registrations in boolean default false)
return clob;
If registrations is true, it returns the list of datasets you register. If false, it returns the available data sets.
Get Stock Image URL Procedure
This procedure displays the URL from which you can select images.
Syntax
function get_stock_image_url return varchar2;
Get Reserved Namespaces Procedure
This procedure displays JSON array of namespaces that are reserved by the system. You cannot use these namespaces.
Syntax
function get_reserved_namespaces return clob;
Update Registration Procedure
This procedure updates an existing registration.
Syntax
procedure update_registration(namespace in varchar2,
data_set_name in varchar,
scope in clob default null,
thumbnail in blob default null,
thumbnail_url in varchar2 default null,
thumbnail_mime_type in varchar2 default null,
parameters in clob default null);
The parameters of this procedure are already described above.