15.103 SEM_APIS.GET_SQL
Format
SEM_APIS.GET_SQL(
sparql_query IN CLOB,
models IN RDF_MODELS DEFAULT NULL,
rulebases IN RDF_RULEBASES DEFAULT NULL,
aliases IN RDF_ALIASES DEFAULT NULL,
index_status IN VARCHAR2 DEFAULT NULL,
options IN VARCHAR2 DEFAULT NULL
graphs IN RDF_GRAPHS DEFAULT NULL,
named_graphs IN RDF_GRAPHS DEFAULT NULL,
network_owner IN VARCHAR2 DEFAULT NULL,
network_name IN VARCHAR2 DEFAULT NULL) RETURN CLOB;
Description
Translates a SPARQL query into a SQL query string that can be executed by an application program.
Parameters
- sparql_query
- A string literal with one or more triple patterns, usually containing variables.
- models
- The model or models to use.
- rulebases
- One or more rulebases whose rules are to be applied to the query.
- aliases
- One or more namespaces to be used for expansion of qualified names in the query pattern.
- index_status
- The status of the relevant entailment for this query.
- options
- Options that can affect the results of queries.
- graphs
- The set of named graphs from which to construct the default graph for the query.
- named_graphs
- The set of named graphs that can be matched by a GRAPH clause.
- network_owner
-
Owner of the RDF network. (See Table 1-2.)
- network_name
-
Name of the RDF network. (See Table 1-2.)
Usage Notes
Before using this procedure, ensure you understand the material in Using the SEM_APIS.GET_SQL Function and SEM_SQL SQL Macro to Query RDF Data.
For information about semantic network types and options, see RDF Networks.
Examples
The following example translates a SPARQL query into a SQL query string.
EXECUTE SEM_APIS.GET_SQL('SELECT ?s ?o { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o }',
sem_models('m1'),null,null,null,' ',null,null,network_owner=>'RDFUSER',network_name=>'MYNET');
Parent topic: SEM_APIS Package Subprograms