Retrieve Information from an Event Table

To automatically retrieve content from an event table, create a new fetch task by following these steps. The connector runs fetch tasks automatically, based on the schedule that is configured in the configuration file.

To create a new Fetch Task

  1. Stop the connector.
  2. Open the configuration file in a text editor.
  3. In the [FetchTasks] section of the configuration file, specify the number of fetch tasks using the Number parameter. If you are configuring the first fetch task, type Number=1. If one or more fetch tasks have already been configured, increase the value of the Number parameter by one (1). Below the Number parameter, specify the names of the fetch tasks, starting from zero (0). For example:

    [FetchTasks]
    Number=1
    0=MyTask
  4. Below the [FetchTasks] section, create a new TaskName section. The name of the section must match the name of the new fetch task. For example:

    [FetchTasks]
    Number=1
    0=MyTask
    
    [MyTask]
  1. In the new section, set the following parameters:

    ConnectionString The connection string to use to connect to the database.
    Template (Optional) The template file used to form the documents that are sent to CFS. For information about how to create a template file, see Construct Template Files.
    PrimaryKeys The column, or combination of columns, used as the primary key for the table. The value of this parameter is case-sensitive.
    SQL The SQL query to use to return data from the event table.
    DeleteEventSql The SQL query to use to delete information from the event table after it has been ingested. The connector replaces the placeholder @Clause with a clause that identifies the rows that have been ingested.

    For example:

    [EventTableTask]
    ConnectionString=...
    Template=main.tmpl
    PrimaryKeys=id
    SQL=SELECT id, metavalue, content FROM event_table
    DeleteEventSql=DELETE FROM event_table WHERE @Clause
    
  2. Save and close the configuration file. You can now start the connector.


_FT_HTML5_bannerTitle.htm