Creating a Positional Layout using Layout Builder
- Akash Kumar Jaiswal (Unlicensed)
- Rohan Dhanwade (Deactivated)
This feature helps you to upload a sample or an exact source file to define the layout by custom selection. By default, this feature remains disabled in the product. You need to enable this feature before you start working on this.
Steps to create positional layout:
- Click Configure > LAYOUTS > Positional.
- Click Create Positional Layout.
- On the Create Layout screen, select the Layout Builder option in the Select Layout UI Type field.
- Click Next. The Create New Positional screen is displayed in a new page.
Type the name and description of the new mapping service in the Name and Description text boxes.
Name: Only alphanumeric and underscore are allowed and you must start the layout name with an alphabet or underscore.
Description: Only alphanumeric and few special characters (_ - . : , @ $ ? \\ and space) are allowed and you must start the description with an Alphabet/Underscore/Number.- Select the Data Header Present check box if you want to add the titles of the fields in your text file. Data Header usually contains the name of the fields in text file. If layout is used at the source end and data header is present in the file. If the layout is used at the target end, and the Data Header Present check box is checked, the Header will be written in the target text file.
- Define the Definition Mode either using definition file or entering the fields sequentially.
Using Import Definition File- Select Import Definition File.
- Select the type of file in the Definition File field. The available options are Data and JSON.
Browse and upload the data file in Upload Data File field.
- Select the project in the Project field.
Click Continue.
- Select Enter the Fields Sequentially as a definition mode.
- Select the field position - Field Length or Start & End Positions.
Field Length: Select this option if the field length is used to set the field positions.
Start & End Positions: Select this option if the start and end positions are used to set the field positions. - Select the project in the Project field.
Click Continue.
- In Definition panel, select the type of layout in the Reference Layout Type field that you want to take as a reference.
- Select the layout which you want to use as a reference file in the Reference Layout field.
- Select the Project in the Project field.
- Expand Advanced Properties to view the advanced properties of positional layout.
- In case, you want to prevent the header rows from being parsed then define a number in Header Skip Row(s) field.
- In case, you want to prevent the footer rows from being parsed then define a number in Footer Skip Row(s) field.
- Define the Character-set encoding for your positional layout in the Character Set Encoding field. The available options are UTF-8, UTF-16, and ISO-8859-1.
In case, the data you are processing through Adeptia Connect contains characters that are a part of another character set encoding, for example, UTF-8, then you need to change the character set encoding. - Enter the target record separator in the textbox Target Record Separator, if you want to write each record in new line in target file. By default records are written in single line. This option is applicable only for the schema used at target end.
- Disable the Handle CR/LF (Source Data) check box, if the source file does not have any carriage return. By default, this option is checked, and schema expects file with carriage return. Handle CR/LF (Source Data) option is applicable only for the schema used at the source end.
Select the Data Truncation check box, in case the data length is more than specified in the schema and you want to pass the specified length of data and ignore the rest of the data.
The schema that you use at the target end has the option of Data Truncation.- Select Allow Less Fields check box if you want to parse the data even if the number of fields in the data file is less than the number of field specified in the schema. If Allow Less Fields checkbox is selected and the schema is used at source end, schema will parse the input data and insert the empty tag of missing fields. If the schema is used at target end, it will write all the tags coming in input XML.
- In case number of fields in source data is more than the number of fields specified in the schema, only those fields are parsed, which are specified in schema. Other fields are ignored. If you want to generate error records, when number of fields in source data is more than the number of fields specified in schema, disable the Allow More Fields check box.
Select Remove Last New Line Record Separator check box if you want to remove the new line record separator from the target file.
When the number of fields in the data file is less than the number of fields defined in the schema then schema will not process the data and give an error during execution.
- When you select the Allow Less Field check box then layout generates an empty tag for fields that are not present in the data file.
- This option is applicable only when you use the schema at the source end.
- In case the input data contains some characters that are invalid in XML, then this may result in the mapping getting aborted. You can filter these invalid XML characters by selecting the Filter Invalid XML Characters checkbox.
- Select Remove Space(s) check box if you want to remove all the leading and trailing spaces(s) from the data value on the source side.
- Select Remove Leading Zero(s) check box if you want to remove all the leading zero(s) from the numeric data value on the source side.
- Once the required properties are defined, you can create the Table Data and Control Total Data.
Steps to define the Table Data:
- In File View Area, select the row which you want to define as a header.
- Right-click and select New Table option to display the Table Data screen.
- On Table Definition screen,
- You can adjust the data length, start and endpoint of a data field using scale. You can also add column by clicking Add Column button.
- You can Insert column left or right, delete column, and split column using the column menu by right click on columns.
- Click on the column to rename it.
- Click Next.
- On Table Column Definition screen,
You can edit the Field Name value. If reference layout is defined, click the field to get the suggestions based on the reference layout.
You can use spaces and other special characters (~`! @ # $%^&*() {} [] | \\ : ; " ' - + =<> / ? . , ) in the field names. The special characters are rendered as underscores (__) if you use this layout in a Mapping.
Select the type of data in the Data Type field. The supported data types for text Layout are:
Data Type
Description
String
Select this data type if the field accepts a string value.
Number
Select this data type if the field accepts a numeric value.
Date
Select this data type if the field accepts a Date or Date and Time value.
If data type is Date, select the date and time format in the Format field.
- The default value of the start position in the Start is 1. You can edit the start position as per your requirement.
- Type the end position of the field in the End after which you want to create a field position that is not in sequence.
Select the alignment of the field in the Align field.
L if the field is left aligned.
R if the field is right aligned.Select Skip check box if you want to skip some fields while generating the XML for your layout. For example, your source file has over 1500 fields, but you only need to use 1000 fields. This Skip check box will omit the 500 fields and it will not read them when it parses the data to XML. However, the fields will be visible in the file. If you create the layout using an existing XSD, then the skipped fields will appear blank. However, when you will use the same layout in other activities such as Mapping, it will display all the fields of the file.
The skipping of fields is useful in case where a standard XSD has a large number of fields. Skipping reduces the size of the XML that will now contain the required fields.To insert rows, specify the number and position of the rows that you want to add in the Number of Rows and at Position fields respectively and click Add Row button. You can add a maximum of 99 rows at a time.
Click Save to save the table data.
You can see the created Table data in Details Panel.
Click button to open table data in data view panel. Also, click button to delete the table data.
Steps to define the Control Total
Before defining the control total value, you must specify these values:Define the Header Skip Row(s) in case you want to parse value in header.
- Define the Footer Skip Row(s) in case you want to parse value in footer.
- In File View area, select the row (based on the defined Header Skip Row(s) or Footer Skip Row(s)) which you want to parse to the source side.
- Right-click and select Control Total option.
- On Control Total Definition screen:
- Control Total Position and Control Total Row Number are automatically updated based on the user selection.
- You can adjust the data length, start and endpoint of a data field using scale. You can also add column by clicking Add Column button.
- You can Insert column left or right, delete column, and split column using the column menu by right click on columns.
- Click on the column to rename it.
Click Next.
On Control Total Column Definition screen, you can get the suggestion for the Field Name if you have selected Reference Layout in the Definition panel. To achieve this, click on the Field Name to view the suggestion.
- Click Save.
You can see the created Control Total in Details Panel.
Click button to open control total in data view panel. Also, click button to delete the control total.
You can view the Control Total and Table Data in Data View panel by clicking Data View button from the toolbar. You can also edit and delete form this panel.
If you want to see the layout in XSD format, click XSD View button from the toolbar. You can also download the XSD file by clicking Download XSD button.
You can test the layout by clicking Test Layout button from the toolbar. Click here to get more details.
- Click Save.