To 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 retrieve information from an event table
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=3 0=EventTableAdd 1=EventTableUpdate 2=EventTableRemove
Below the [FetchTasks]
section, create a new TaskName section. The name of the section must match the name of the new fetch task.
In the new section, set the following parameters:
ConnectionString
|
The connection string to use to connect to the database. |
EventTableType
|
The type of operation to perform for each document that is returned by the query. To configure all three types of ingest operation, configure three separate fetch tasks.
|
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 If you use the same table for storing adds, updates, and deletes, ensure that your |
PrimaryKeys
|
The column, or combination of columns, to use as the primary key for the table. The value of this parameter is case-sensitive. |
Template
|
(Optional) The template file used to form the documents that are ingested. For information about how to create a template file, see Construct Template Files. Micro Focus recommends that you use the same template for |
For example:
[FetchTasks] Number=3 0=EventTableAdd 1=EventTableUpdate 2=EventTableRemove [EventTableAdd] ConnectionString=... EventTableType=add SQL=SELECT id, content FROM event_adds DeleteEventSql=DELETE FROM event_adds WHERE @Clause PrimaryKeys=id Template=document.tmpl [EventTableUpdate] ConnectionString=... EventTableType=update SQL=SELECT id, content FROM event_updates DeleteEventSql=DELETE FROM event_updates WHERE @Clause PrimaryKeys=id Template=document.tmpl [EventTableRemove] ConnectionString=... EventTableType=remove SQL=SELECT id FROM event_deletes DeleteEventSql=DELETE FROM event_deletes WHERE @Clause PrimaryKeys=id Template=remove.tmpl
Save and close the configuration file. You can now start the connector.
|