You can use an Advanced Text file to define the structure of your Source or Destination layout. An Advanced Text file refers to a text file that can have multiple record formats and field separators. To create an Advanced Text File Layout, you need to specify the format of the text file.
Follow the steps below to create an advanced text layout using the default option:
In the Field Separator field, provide the field separator, for example, \t for Tab and \s for space. Field Separator is used to separate fields.
|
In the Definition File field, select the definition type (XSD).
Click Choose File, navigate to and select the required file (XSD), and then click Open to upload.
In the Match Pattern field, enter the pattern against which you want to match the record.
You can use regular expression in the Match Pattern field. For example, if in the data file there is a Company Name field that can have value like XYZ SYSTEMS, INC. Since you can use \S as a field separator, the layout will consider XYZ, SYSTEM, and INC as separate fields. But they need to be a part of the same field. To parse this type of data, you can enter \S+ .* (INC\.|INC(ORPORATED)?) in the Match Pattern field. This pattern matches the fields that have spaces and end with INC. or INCORPORATED. |
Enter a particular pattern that you want to skip in the Skip Pattern field. You can also use regular expression in this field.
Click the Add Record button to define another type of record format and follow the steps from ii through vi.
For adding more fields in the same record format, click the Add Row button. Advance text layout supports only String data type. |
Once you finish adding the records and defining their record identifiers, click the Refresh button under the Hierarchy Definition. This action will populate the record identifiers in the Record ID field.
Select Allow Less Fields check box to process the data in case the number of fields in the data file is less than the number of fields defined in the layout.
|
Select the Ignore Header check box if you want the header line in the data file is to be ignored.
Select the Look Ahead check box if the data file has new line or multiple new line to separate the fields.
Select a record from the Record ID field of the current record and enter all the information.
Select a record from the Record ID list box of the root record and repeat step 1-2 to create another root Record.
Each root Record must have a unique Record ID. For example, if you select [0-9][8,8]+[D] as the first root record, then you need to select Agent in the next root record. |
Using Record at Child Level
Click the Add Child.
This creates a record at a level below that of the current record.
Select a record from the Record ID list box of the root record and repeat step 1-2 to create a child record.
A parent and child record must have a unique Record ID in one hierarchy. For example, if you select [0-9][8,8]+[D] as the parent record, then you need to select Agent as the child record. Similarly, if you create another child record under Agent, then you need to select Officer as its Record ID. |
Select a record and click the Remove button to remove it. This will display a confirmation delete message, click OK to delete the record. Alternately, if you delete the last field name of a record and then save the layout, this action will delete the entire field. For example, a record has three fields – Name, Description, and Age. If you delete Age, save the layout, this action will delete the entire field. If a record has one or more child record, deleting the parent record will delete all its child record too. |