# Striim 3.10.1 documentation

#### CREATE SOURCE

CREATE SOURCE <name>
USING <adapter 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 Adapters reference section to determine the requirements of the adapter 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). You may use environment variables in property values (see Using environment variables in source and target properties).

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 (
) OUTPUT TO CsvStream;