Once you have created, configured, and validated the database connection, the next step is to configure one or more Feeds off of the new Database Connection. The Feed type for a database connection will always be a SQL Feed.
Go to the Pipeline, hover over the Connection to expose the gear icon, then click the +
on the right side of the popup for “New”, then select “New Feed”.
Step 1: Configure
Enter the information requested to configure the new SQL Feed:
The following options are available on all SQL feeds:
Option | Description | Required | Example |
---|---|---|---|
Feed Name | Display name of SQL Feed. | Yes | wiretap_record |
Description | This is where the administrator can enter notes for the feed. | No | |
Query | SQL Query. (Entered in Step 2) | Yes | select * from wiretap_record |
Query Timeout | Number of seconds to wait for the query to return results from the database. If time is exceeded, the feed and downstream pipeline steps will display an error. | Yes | 60 |
Ignore SQL Comment | Yes – Text inside of the comment block /* … */ or inline comment — in the query statement will be ignored
No – The server will attempt to parse comments for edgeSuite tokens nodeVar, safeNodeVar, and src which can result in server error. This option should be on in most of the cases unless you need to have /*, */ or — as part of a literal string. |
||
Poll Interval | If > 0, specifies the interval in seconds before the data for the query is considered stale and the query is re-executed. Setting this to 0 indicates the data never becomes stale and will not be automatically queried again. | Yes | 60 |
Enable Server Subscription | Yes – Use server subscriptions to ensure data is fetched before any client subscribes to the data, and the data will be updated automatically based on Poll Interval.
No – Data is fetched on-demand when a client subscribes and cached for the duration of a poll period. |
No |
Once the proper settings have been specified, click “Next”.
Step 2: Query
This is where you enter the sql query statement.
Step 3: Configure options for attributes
For any attribute for which indexing is needed for transforms that reference the feed, check the box for the corresponding attribute under “Indexing On”.
Each index will consume both memory and CPU to maintain. Only check this if a downstream SQL transform references the attribute in a where clause. For the example status attribute, the query would look like:
select * from {src:active_incidents} where status = 'LOGGED'
Step 4: Data Preview
Preview the results of the query:
Click “Save” or “Save and Close” to add the Feed to the Pipeline.