# Record Extractor

This component parses the input data against ISM type data structure and extract the data of one field group.

<div align="left"><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image256.png" alt=""></div>

![](https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image247.png)

This data structure consists of one master group and one detail group. The detail group is repeatable, and the repeat count is set at the third field named RecordCount.

The RecordExtractor parses input data and construct Master and Detail. If the target field group is master, the first line is extracted. Otherwise, the multiple records from the line number 2 to the repeat count are extracted.

If the input data is more than the expected, it continues the parsing of the remaining data assuming that the first cycle is over and the second cycle is started. This is used to extract the records of the data structure which consists of one field group like table.

## **Input**

&#x20;

<table><thead><tr><th width="207">Attribute</th><th>Description</th></tr></thead><tbody><tr><td>Data Structure id</td><td>Data structure for the input data</td></tr><tr><td>Data Source</td><td><p>The source of input data</p><p>File</p><p>String</p><p>Object</p></td></tr><tr><td>Input Name</td><td><p>The name of the input source</p><p>File - File name with path</p><p>String - Parameter name</p><p>Object - Parameter name</p></td></tr><tr><td>Field Group</td><td>Field group of the output data</td></tr><tr><td>Use Carriage Return</td><td>Use carriage return(\r) and new line(\n) for windows file?</td></tr><tr><td>Storage Type</td><td><p>Storage type of extracted data. The default option is memory. But if the input data is high volume, OutOfMemory issue may be raised. File based array list is useful to avoid the memory issue.</p><ul><li>Memory - ArrayList</li><li>File - File based ArrayList</li></ul></td></tr></tbody></table>

&#x20;

## **Output**

&#x20;

<table><thead><tr><th width="207">Attribute</th><th>Description</th></tr></thead><tbody><tr><td>RecordArray</td><td>Extracted list</td></tr><tr><td>RecordCount</td><td>Record count</td></tr><tr><td>DataStructureId</td><td>Data structure id linked to the extracted data</td></tr><tr><td>Use In Mapping</td><td>Used in mapping component</td></tr></tbody></table>

&#x20;

**Example**

In this scenario, the input data is retrieved from the remote sFTP server, the body part of the data is extracted, and the extracted data is stored in a local file. The data structure and input file is same as the screenshot above.

\<img src="<https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image257.png>" alt="Graphical user interface

Description automatically generated with medium confidence" width="563">

### FTP Input

The FTP Input component gets header\*txt from the remote sFTP server and store in the local disk.

&#x20;

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image258.png" alt="" width="563"><figcaption></figcaption></figure>

### RecordExtract

The RecordExtract component parse the input file against the Header-Body data structure, extracts Body data, and store into the parameter called RecordArray in the memory.

| Input                                                                                                                                                                            | Output                                                                                                                                                  |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![Graphical user interface, text, application, email&#xA;&#xA;Description automatically generated](https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image259.png) | ![Chart&#xA;&#xA;Description automatically generated with low confidence](https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image260.png) |

&#x20;

### File Output

The File Output component saves the input data as a file.

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image261.png" alt="" width="563"><figcaption></figcaption></figure>

| Input File                                                                        | Output File                                                                       |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| ![](https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image262.png) | ![](https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image263.png) |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ism-docs.xnarum.com/tasks/file/record-extractor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
