14.3.2.12.1 Getting Started with the RDF View Wizard

Perform the following steps to create an RDF view graph using the RDF View Wizard.
The instructions assume that the application is connected to a data source. The required relational tables and RDF network exist in the database.
  1. Navigate to the Data page.
  2. Select the Data source and RDF network.
  3. Right click RDF Views under RDF Objects in the RDF Network tab.
  4. Click Create using Wizard from the context menu.
    The Create RDF View Wizard page opens on the right panel as shown:

    Figure 14-61 Create RDF View Wizard



  5. Create the Resource Maps (nodes) for the RDF view graph in the Designer tab.
    1. Click the Add new Resource Map (+) icon.
      The Create Resource Maps dialog opens.

      Figure 14-62 Create Resource Maps



    2. Select the required input tables and move the selection to the right.
    3. Select a prefix value from the Using prefix drop-down.
    4. Click Create.
      The selected tables are added and displayed in the Resource Maps section.

      You can click on a specific resource map to view the details as shown:

      Figure 14-63 Viewing Resource Map Details



      Also, note the following:

      • If the underlying database table for the resource map does not have a primary key, then the first table column will be considered as the resource map Key by default.
      • You can choose to edit the key, class, and template (subject) of the resource map in the Resource Map Details section.
      • You can choose to edit the mapping for the predicate and object of the properties in the Resource Map Properties section.
  6. Create the Triple Maps (edges) for the RDF view graph in the Designer tab.
    1. Click the Triple Map (+) icon.
      The Create Triple Map workflow opens and the Name step is displayed.

      Figure 14-64 Create Triple Map: Name



    2. Enter the Triple Map name.
    3. Click the Next arrow icon.
      The Select step opens as shown.

      Figure 14-65 Create Triple Map: Select



    4. Select the Relationship table from the drop-down.
    5. Click the Next arrow icon.
      The Define step opens displaying the Source tab.

      Figure 14-66 Create Triple Map: Define



    6. Select the source References RMAP and Key in the Source tab.
    7. Select the Prefix and Suffix values in the Edge tab.
    8. Select the destination References RMAP and Key in the Target tab.
    9. Click the Next arrow icon.
      The Summary of the designed graph structure is displayed. For example:

      Figure 14-67 Create Triple Map: Summary



    10. Click Create.
      The configured triple is added and displayed in the Triple Maps section.
    11. Optionally, repeat step-6 to add as many triple maps as required.
      You can click on a specific triple map to view or edit the details as shown:

      Figure 14-68 Viewing Triple Map Details



  7. Optionally, review and click Download to download the mapping details in the R2RML tab.
  8. Click Create (Create RDF View button) on the top right of the Create RDF View Wizard page.
    The Create RDF View window opens as shown:
  9. Enter RDF View name and click Create.
  10. Refresh RDF Views in the left pane under RDF Objects.
    The newly created view is successfully added to the list.

    Optionally, you can right click on an RDF view graph and click Open to view the RDF view graph details. You can execute SPARQL queries in the SPARQL tab. The results of the SPARQL query can be viewed either as a tabular output, graph, or both.

    Figure 14-71 Executing SPARQL Queries on an RDF View



    You can also right click on an RDF view graph and select Visualize. This opens the RDF view visualization page in a new tab. You can enter a SPARQL query in the Query selector section and click Execute. The output of the query is displayed as a graph in the Graphviz section. For example, consider running the following SPARQL query to find the department in which the employees work:

    PREFIX ex: <http://www.example.oracle.com/>
    construct { ?s ex:worksIn ?o }
    where {
      ?s ex:worksIn ?o
    }
    LIMIT 25

    The query visualization output gets displayed as shown:

    Figure 14-72 Visualizing SPARQL Queries on an RDF View Graph