Home | Table of Contents | Input Port Reading | CloverETL 4.6.1
--- | --- | ---
Prev | Common Properties of Readers | Next

### Input Port Reading

Input port reading allows you to read file names or data from the optional input port. This feature is available in most of readers.

To use input port mapping, connect an edge to the input port. Assign metadata to the edge. In the Reader, edit the File URL attribute.

The attribute value has the syntax `port:$0.FieldName[:processingType]`. You can enter the value directly or with help of URL File Dialog.

Here `processingType` is optional and defines if the data is processed as plain data or url addresses. It can be `source`, `discrete`, or `stream`. If not set explicitly, `discrete` is applied by default.

##### Processing Type

- `discrete`

  Each data record field from input port represents one particular data source.

- `source`

  Each data record field from input port represents a URL to be loaded in and parsed.

- `stream`

  All data fields from input port are concatenated and processed as one input file. If the `null` value of this field is met, it is replaced by the `eof`. Following data record fields are parsed as another input file in the same way, i.e., until the `null` value is met. The Reader starts parsing data as soon as first bytes come by the port and process it progressively until eof comes. See Output Port Writing for more information about writing with `stream` processing type.

##### Input Port Metadata

In input port reading, only metadata field of some particular data types can be used. The type of the `FieldName` input field can only be `string`, `byte`, or `cbyte`.

##### Processing of Input Port Record

When graph runs, data is read from the original data source (according to the metadata of the edge connected to the optional input port of the Readers) and received by the Reader through its optional input port. Each record is read independently of the other records. The specified field of each one is processed by the Reader according to the output metadata.

##### Readers with Input Port Reading

| Important
Remember that port reading can also be used by DBExecute for receiving SQL commands. Query URL will be as follows: port:$0.fieldName:discrete. Also SQL command can be read from a file. Its name, including path, is then passed to DBExecute from input port and the Query URL attribute should be the following: port:$0.fieldName:source.

CloverDataReader
ComplexDataReader
DBFDataReader
DBInputTable
FlatFileReader
JSONExtract
JSONReader
MongoDBReader
MultiLevelReader
QuickBaseRecordReader
SpreadsheetDataReader
XMLExtract
XMLReader
XMLXPathReader

Metadata on the input port of EmailReader can have only one field.

Prev | Up | Next
Viewing Data on Readers | Home | Table of Contents | Incremental Reading