Configure the Connector

This section describes how to use the SubTables parameter to retrieve data from a sub-table.

To retrieve data from a sub-table

  1. Stop the connector.
  2. Open the connector’s configuration file and find the [FetchTasks] section.
  3. Use the SubTables parameter to specify the name of a new section in the configuration file. The new section will contain parameters that instruct the connector to extract data from the sub-table. For example:

    [ExampleDatabase]
    ConnectionString=...
    SQL=select * from orders
    PrimaryKeys=OrderID
    Template=template.tmpl
    SubTables=Customers
  4. Create the new section, and set the following parameters.

    Template The path to a template file. The template file defines how the data extracted from the table is indexed into IDOL Server.
    SQL A SQL statement to retrieve the information from the sub-table.

    For example:

    [Customers]
    Template=customers.tmpl
    SQL=select * from Customers where CustomerID=@CustomerID

    NOTE: The connector runs this query for every row returned by the main SQL statement (select * from orders). The connector automatically replaces @CustomerID with the CustomerID retrieved from the main table (orders).

  5. Save and close the configuration file.