Skip to main content

CREATE SOURCE

CREATE SOURCE <name>
USING <reader name> ( <properties> ) 
[ PARSE USING <parser name> ( <properties> ) ] 
OUTPUT TO <stream name> 
  [SELECT ( <data field>, ...  [ WHERE <expression>, ... ] ), ...];

Whether the properties and PARSE USING clause are required depends on the adapter. See the Sources topic for the writer you are using.

If an optional property is not specified, the source will use its default value. Values for required properties must be always specified in TQL, even if they have default values (which are displayed automatically in the web UI).

For information about the SELECT clause, see Filtering data in a source.

Here is a complete example of a CREATE SOURCE statement:

CREATE SOURCE AALSource using AAlReader (
  directory:'$ACCESSLOGPATH',
  wildcard:'$ACCESSLOGFILE:access_log')
OUTPUT TO AccessEntryStream;

If the OUTPUT TO stream does not exist, it will be created automatically, using the type associated with the adapter. When there is only one output stream, it is not mapped, and there is no SELECT clause, you may follow the stream name with any of the options described in CREATE STREAM. See also Using OUTPUT TO ... MAP.

Example from the PosApp sample application:

CREATE source CsvDataSource USING FileReader (
  directory:'Samples/PosApp/appData',
  wildcard:'posdata.csv',
  blocksize: 10240,
  positionByEOF:false
)
PARSE USING DSVParser (
  header:Yes,
  trimquote:false
) OUTPUT TO CsvStream;