15.25 SEM_APIS.BULK_LOAD_FROM_STAGING_TABLE
Format
SEM_APIS.BULK_LOAD_FROM_STAGING_TABLE( model_name IN VARCHAR2, table_owner IN VARCHAR2, table_name IN VARCHAR2, flags IN VARCHAR2 DEFAULT NULL, debug IN INTEGER DEFAULT NULL, start_comment IN VARCHAR2 DEFAULT NULL, end_comment IN VARCHAR2 DEFAULT NULL, network_owner IN VARCHAR2 DEFAULT NULL, network_name IN VARCHAR2 DEFAULT NULL);
Note:
This subprogram will be deprecated in a future release. It is recommended that you use the SEM_APIS.BULK_LOAD_RDF_GRAPH subprogram instead.Description
Loads semantic data from a staging table.
Parameters
- model_name
-
Name of the model.
- table_owner
-
Name of the schema that owns the staging table that holds semantic data to be loaded.
- table_name
-
Name of the staging table that holds semantic data to be loaded.
- flags
-
An optional quoted string with one or more of the following keyword specifications:
-
COMPRESS=CSCQH
uses COLUMN STORE COMPRESS FOR QUERY HIGH on the RDF_LINK$ partition for the model. -
COMPRESS=CSCQL
uses COLUMN STORE COMPRESS FOR QUERY LOW on the RDF_LINK$ partition for the model. -
COMPRESS=RSCA
uses ROW STORE COMPRESS ADVANCED on the RDF_LINK$ partition for the model.
-
COMPRESS=RSCAB
uses ROW STORE COMPRESS BASIC on the RDF_LINK$ partition for the model.
-
DEL_BATCH_DUPS=USE_INSERT
allows the use of an insertion-based strategy for duplicate elimination that may lead to faster processing if the input data contains many duplicates. -
MBV_METHOD=SHADOW
allows the use of a different value loading strategy that may lead to faster processing for large loads. -
PARALLEL_CREATE_INDEX
allows internal indexes to be created in parallel, which may improve the performance of the bulk load processing. -
PARALLEL=<
integer
>
allows much of the processing used during bulk load to be done in parallel using the specified degree of parallelism to be associated with the operation. -
PARSE
allows parsing of triples retrieved from the staging table (also parses triples containing graph names). -
<task>
_JOIN_HINT=
<join_type>
, where <task> can be any of the following internal tasks performed during bulk load:IZC
(is zero collisions),MBV
(merge batch values), orMBT
(merge batch triples, used when adding triples to a non-empty model), and where <join_type> can beUSE_NL
andUSE_HASH
.
-
- debug
-
(Reserved for future use)
- start_comment
-
Optional comment about the start of the load operation.
- end_comment
-
Optional comment about the end of the load operation.
Usage Notes
You must first load semantic data into a staging table before calling this procedure. See Bulk Loading Semantic Data Using a Staging Table for more information.
Using BULK_LOAD_FROM_STAGING_TABLE with Fine Grained Access Control (OLS)
When fine-grained access control (explained in Fine-Grained Access Control for RDF Data ) is enabled for the entire network using OLS, only a user with FULL access privileges to the associated policy may perform the bulk load operation. When OLS is enabled, full access privileges to the OLS policy are granted using the SA_USER_ADMIN.SET_USER_PRIVS procedure.
When the OLS is used, the label column in the tables storing the RDF triples must be maintained. By default, with OLS enabled, the label column in the tables storing the RDF triples is set to null. If you have FULL access, you can reset the labels for the newly inserted triples as well as any resources introduced by the new batch of triples by using appropriate subprograms (SEM_RDFSA.SET_RESOURCE_LABEL and SEM_RDFSA.SET_PREDICATE_LABEL).
Optionally, you can define a numeric column named RDF$STC_CTXT1 in the staging table and the application table, to assign the sensitivity label of the triple before the data is loaded into the desired model. Such labels are automatically applied to the corresponding triples stored in the RDF_LINK$ table. The labels for the newly introduced resources may still have to be applied separately before or after the load, and the system does not validate the labels assigned during bulk load operation.
The RDF$STC_CTXT1 column in the application table has no significance, and it may be dropped after the bulk load operation.
By default, SEM_APIS.BULK_LOAD_FROM_STAGING_TABLE uses the semantic network compression setting (stored in RDF_PARAMETER table) for the model.
Examples
The following example loads semantic data stored in the staging table named STAGE_TABLE in schema SCOTT into the semantic model named family
. The example includes some join hints.
EXECUTE SEM_APIS.BULK_LOAD_FROM_STAGING_TABLE('family', 'scott', 'stage_table', flags => 'IZC_JOIN_HINT=USE_HASH MBV_JOIN_HINT=USE_HASH');
Parent topic: SEM_APIS Package Subprograms