Striim 3.9.4 / 3.9.5 documentation

Source

A source is a start point of a flow and defines how data is acquired from an external data source. A flow may have multiple sources.

Each source specifies:

  • an input adapter (reader) for collection of real-time data from external sources such as log files (for more detailed information, see Readers)

  • properties required by the selected reader, such as a host name, directory path, authentication credentials, and so on

  • with some readers, a parser that defines what to do with the data from the source (for example, DSVParser to parse delimited files, or FreeFormTextParser to parse using regex)

  • an output stream to pass the data to other flow components

Here is the TQL code for one of the sources in the MultiLogApp sample application:

CREATE SOURCE Log4JSource USING FileReader (
  directory:'Samples/MultiLogApp/appData',
  wildcard:'log4jLog.xml',
  positionByEOF:false
) 
PARSE USING XMLParser(
  rootnode:'/log4j:event',
  columnlist:'log4j:event/@timestamp,
    log4j:event/@level,
    log4j:event/log4j:message,
    log4j:event/log4j:throwable,
    log4j:event/log4j:locationInfo/@class,
    log4j:event/log4j:locationInfo/@method,
    log4j:event/log4j:locationInfo/@file,
    log4j:event/log4j:locationInfo/@line'
)
OUTPUT TO RawXMLStream;

Log4JSource uses the FileReader adapter to read …/Striim/Samples/MultiLogapp/appData/log4jLog.xml, parses it with XMLPaarser, and outputs the data to RawXMLStream. In the UI, the same source looks like this:

log4jsource311.png

Note: The other examples in the Concepts Guide appear in their TQL form only, but they all have UI counterparts similar to the above.