Oracle Connector 25.4
Oracle Connector Help

# Sub-Table Template Files

In a database, information about a single subject can be divided between multiple tables. This allows data to be stored more efficiently.

To extract data from multiple tables, you can configure sub-tables by setting the `SubTables` parameter. When you extract data from sub-tables, you need to create a template for the main table and a template for each sub-table.

In the main template file, specify the locations where the data from the sub-tables is included in the document. To do this, insert HTML comments (`<!--comment-->`) where `comment` is the name of a sub-table defined in the configuration file.

For example, if you set `SubTables=Customer` the main template might look like this:

    #DREREFERENCE <!--OrderID-->
    #DREFIELD Date="<!--Date-->"
    #DREFIELD CustomerID="<!--CustomerID-->"
    #DREFIELD Status="<!--Status-->"
    <!--Customer-->
    #DRECONTENT
    Order information
    Date Received: <!--Date-->
    Status: <!--Status-->
    #DREENDDOC

The sub-table template (referenced by `<!--Customer-->`) might look like this:

    #DREFIELD Customer_Title="<!--Title-->"
    #DREFIELD Customer_Name="<!--FirstName--> <!--LastName-->"

Each HTML comment in the sub-table template specifies that data should be inserted from a column in the sub table.

When the connector runs a fetch task, the templates are combined and used to create a single document for each row returned by the query. A resulting document might look like this:

    #DREREFERENCE 012345
    #DREFIELD OrderDate="16/10/2012 15:27:11"
    #DREFIELD Customer="2563"
    #DREFIELD Status="Order complete"
    #DREFIELD Customer_Title="Mr."
    #DREFIELD Customer_Name="John Smith"
    #DRECONTENT
    Order information
    Date Received: 16/10/2012 15:27:11
    Status: Order complete
    #DREENDDOC

Copyright 2025 Open Text
Version 25.4 | Last updated October 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Oracle Connector 25.4

Topic Title: Sub-Table Template Files