Devo Full Query
This unit is a Source unit type.
This unit runs the query specified in its settings for each input event.
Output events are generated both to signal query operations and to deliver query results.
An input event comes through the in port. Then, an event is sent to the init port to signal the start of the query. The query specified in the properties is executed. An event is sent through the data port for each result row.
The error port outputs an event every time there's an error running the query, retrieving new records, etc. The unit adds the field "action" to the output events with the value 'error', plus other standard error fields containing details about the error.
Finally, an event is sent through the end port every time a query ends, be it after an error, or when there are no more results. These events are the same as the input events, without any modification.
After dragging this unit into the Flow canvas, double-click it to access its configuration options. The following table describes the configuration options of this unit:
|General||Name||Enter a name for the unit. It must start with a letter, and cannot contain spaces. Only letters, numbers, and underscores are allowed.|
|Query||The Devo query to be performed. This query can include parameters (defined in the 'parameters' field), that will be filled with the corresponding input event field.|
|Start time||You can specify a start time if you wish to test the query without input events. The unit will start sending data from that time included.|
|End time||You can specify an end time if you wish to test the query without input events. The unit will stop sending data from this time (excluded).|
|Parameters||A list of field names of the input events to be used as parameters in the query.|
|Map on||When defined, this is the name of the output event field if you wish it to contain a map from column names to values.|
|Kill current queries||As this is a passive unit, there can be a number of queries running simultaneously, depending on the number of threads (active units) providing data to it. Turn this on to kill previous queries before issuing a new query on a new input event.|
|Columns||Event field||The name of an input event field containing a list of (name, type) pairs.|
Click the plus icon to add name-type pairs.
You can collapse and expand the pairs using the icon, reorder using the arrows, or delete using the X icon.
|Name||The name of an output event field where the query result will be inserted.|
|Type||The expected type for the query result (you can also write a java class qualified name).|
In this tab, you can specify values corresponding to input event fields, overriding previous settings. If no corresponding field is found in the input event, the default values are applied.
|Query||Input event field containing the query.|
|Start time||Input event field containing the start time.|
|End time||Input event field containing the end time.|
|in||Each of the events in this stream will run the indicated query.|
|init||Outputs an event every time a new query is launched (on each input event). These events are the same as the input events, without any modification.|
|data||Outputs an event for each query result row. The events generated are the input events extended with fields including the query results. Further required columns can be specified in the unit configuration options.|
|error||Outputs an event every time there's an error running the query, retrieving new records, etc. The generated event is an input event enriched with standard error messages.|
|end||Outputs an event every time a query ends, be it after an error, or when there are no more results. These events are the same as the input events, without any modification.|