Output
The output for the activity is the following.
Output Item |
Datatype |
Description |
Rows |
complex |
This output item contains the list of parsed lines from the input. This is useful to determine the number of records parsed by this activity. The schema specified by the Data Format resource is contained in this output item. |
schema |
complex |
The schema containing the data from the parsed input text. This output item contains zero or more parsed records. |
ErrorRows |
|
This output item is available when Continue on Error is checked, and error(s) while parsing the records in the input. <<raw input data is put in the error string>> This field contains the list of error lines for the records from the input that failed parsing. See the following example explaining successful parsing of records specified as Optional and Mandatory. During parsing, if any of the Required data items are missing, the records are displayed in the Error Row. If there are missing Optional items, the records are displayed in the Output Row. |
EOF |
boolean |
This output item is useful for checking if there are no more records in the input stream when you are reading the input in parts to preserve memory. For more information, see Parsing a Large Number of Records. |
Example
The example contains two input records containing five data items, ID, FName, LName, Address and Age. All the items are declared mandatory.
,FN1,LN1,Pune,99
2,FN2,LN2,Pune,33
Shown below is the output of the two records, after parsing them.
As the field "ID" is missing from the first record, the entire record appears in the ErrorRows element.
<?xml version = "1.0" encoding = "UTF-8"?>
<Output>
<Rows>
<root>
<ID>2</ID>
<FName>FN2</FName>
<LName>LN2</LName>
<Address>Pune</Address>
<Age>33</Age>
</root>
</Rows>
<ErrorRows>
<ErrorString>,FN1,LN1,Pune,99</ErrorString>
</ErrorRows>
<EOF>true</EOF>
</Output>
When the ID field is declared Optional, and is missing, it is not an error. The records appear in the output string :
<?xml version = "1.0" encoding = "UTF-8"?>
<Output>
<Rows>
<root>
<FName>FN1</FName>
<LName>LN1</LName>
<Address>Pune</Address>
<Age>99</Age>
</root>
<root>
<ID>2</ID>
<FName>FN2</FName>
<LName>LN2</LName>
<Address>Pune</Address>
<Age>33</Age>
</root>
</Rows>
<ErrorRows/>
<EOF>true</EOF>
</Output>