Creating a Text Layout using Layout Builder

This feature helps you to manually create text layout through a text file directly. You can choose 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. 

To create text file layout using layout Builder, you need to upload the data file in Adeptia Connect. 

Steps to create Text Layout

  1. Click Configure > LAYOUTS > Text.
  2. Click Create Text Layout.
  3. On the Create Layout screen, select the Layout Builder option from the drop-down list of Select Layout UI Type field.



  4. Click Next. The Create New Text Layout screen is displayed in a new page.
     
    1. Type the name and description of the new mapping activity 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.

    2. Select the Array Fields Present checkbox if you want the Layout to parse the files having data in single or composite array format. 

      Important

      The Layouts created for files containing the data in array format can only be used at the Source.

    3. When you select Array Fields Present checkbox, you need to perform the steps e, f, and 7, and then click Continue to define the records on the Record Definition screen. Once you have defined the records, perform step 10 to save the layout. Follow the steps given here to define the records.
    4. Select the Data Header Present checkbox 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.
    5. Provide the record separator, for example, \n for newline or " " for space, in the Record Separator. The record separator is used to separate the records.
    6. Provide the field separator, for example, \t for Tab or " " for space, in the Field Separator. Field Separator is used to separate fields.
    7. Define the Definition Mode either using definition file or entering the fields sequentially.
      Using Import Definition File
      1. Select Import Definition File.
      2. Select the type of file from the Definition File drop down list box.
      3. Browse and upload the data file in Upload Data File field.

      4. Select the project from the SelectProject drop-down list.

        By default, SelectProject drop-down box displays the default project of the logged-in user as the selected project. 
      5. Click Continue.

      Using Entering the Fields Sequentially
      1. Select Enter the Fields Sequentially.
      2. Select the project from the SelectProject drop-down list.

        By default, SelectProject drop-down box displays the default project of the logged-in user as the selected project. 
      3. Click Continue.
      4. On Table Data screen, type the name of each field in the Field Name text box.
      5. Type the original name of each field in the Original Name text box.
      6. Select the type of data from the Data Type drop-down list. 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.

      7. If data type is Date, select the date and time format from the Format drop-down list.

      8. Click Save to save the table data.

  5. In Definition panel, select the type of layout from the drop-down list of Reference Layout Type field that you want to take as a reference.
  6. Select the layout which you want to use as a reference file from the drop-down list of Reference Layout field.
  7. Select the Project from the drop-down list of Project. This option is visible only when GAC is enabled.
  8. Expand Advanced Properties to view the advanced properties of text layout.
    1. Type the row start position in the Row Start Position textbox. Row Start Position specifies which row of the text file is counted as first row.

      For example, if you enter value as 5 in the Row Start Position, 5th row of the text file is counted as the first row. If this layout is used at source end, the data from the 5th row onward is taken for processing.
    2. In case, you want to skip certain bottom row from the text file then define the row count from Bottom Row Skip Count field.
    3. Define the Character-set encoding for your text layout from the drop-down list of 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.
    4. Type the enclosing characters to remove from the data file while parsing in the Handle Enclosing Character. Currently, following enclosing characters are supported:
      • Single Quote (')
      • Double Quote (")
      • Less than symbol (<)
      • Greater than symbol (>)

      Handling Enclosing Character is supported for source schema only. If Quotes Handling is checked true, the value of data file at the target schema will be appended with the enclosing character.
    5. Dynamic Header Present checkbox is an advanced feature of text layout, which is used to parse text, if:
      FieldNames defined in the source layout and the Data Headers (Column Name) of the text file is same but not in the same order.
      FieldNames defined in the source layout and the Headers of the text file is not same. They may or may not be in the same order.

      If the headers are not matched between Schema Definition and Source File then xml (output of layout) will only have Root rather than any Record entry. For instance, if the headers of the source layout  are Id, Name, and Age and the headers of the data file are Emp Id, Emp Name, and Emp Age then the output of the layout will be blank.                     

      On selecting the Dynamic Header Support checkbox, Allow Ignore case checkbox appears. Select Allow Ignore case checkbox to ignore the casing mismatches in the header of the layout and the data file.

    6. Select Quotes Handling check box to enable quotes handling.
    7. When using Text schema at the target side, select the  to enclose the target field values in double quotes. For example, "John","Smith".

    8. 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.

    9. 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.
    10. In case the input data contains some characters that are invalid in XML then this may result in the aborted mapping. You can filter these invalid XML characters by selecting the Filter Invalid XML Characters checkbox.


  9. Once the required properties are defined, you can create the Table Data and Control Total Data, or Record Definition using their respective screens. 

    The Record Definition screen appears only when you have selected Array Fields Present checkbox on the Create New Text Layout screen.

    Steps to define the Table Data:

    1. In File View Area, select the columns which you want to define as a header.
    2. Right-click and select New Table option to display the Table Data screen.



    3. On Table Data screen, 



      1. You can edit the Field Name value. If reference layout is defined, click the field to get the suggestions based on the reference layout.
      2. Select the type of data from the Data Type drop-down list. 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.

      3. If data type is Date, select the date and time format from the Format drop-down list.

      4. Plain Text only is supported as Data Mode. 
      5. Click Save to save the table data.

    4. 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
    You can define the control total to parse a single column value to the source side. Before defining the control total value, you must specify these values:
    • Define the Row Start Position in case you want to parse value in header. The value must be more than 1.

    • Define the Bottom Row Skip Count in case you want to parse value in footer. The value must be more than 0.

    Follow these steps to define the control total:
    1. In File View area, select the columns which you want to parse to the source side. 
    2. Right-click and select Control Total option to display the Control Total Data screen.



    3. Select the In Header button if you want to parse the value in header. Similarly, select In Footer button to parse the value in footer.



    4. Define the row and column values. 

      In case, you have selected In Footer then you must update the Row value as per Bottom Row Skip Count value. For example, if you defined Bottom Row Skip Count value as 3 then row column value must be from 1 to 3 based on the selected row.
    5. Click Save.
    6. You can see the created Control Total in Detail Panel. 



      Click  button to open control total in data view panel. Also, click  button to delete the control total.
      Steps to define the records
      1. On Record Definition screen, type the name of each field in the Field Name text box.
      2. Select the type of data from the Data Type drop-down list.
        The supported data for text Layout are described in the following table:

        Data Type

        Description

        String

        Select this data type if the field contains a string value.

        Number

        Select this data type if the field contains a numeric value.

        Date

        Select this data type if the field contains a Date or Date and Time value.

        Number Array

        Select this data type if the field contains values of numeric data type.

        String Array

        Select this data type if the field contains values of string data type.

        Date Array

        Select this data type if the field contains values of Date or Date and Time type.

        Composite Array

        Select this data type if the field contains values in a combination of numeric, string, Date/Date and Time data types. 

        If you select Composite Array as the data type for a field in the file, you need to define the subfields of the Composite Array field by following the steps given below:

        1. Click(Add Sub Fields) against the Composite Array field. 

        2. Clickon the left of Composite Array field to expand and see the added row for defining the subfield.

        3. For the subfield, enter the name, data type (String, Number, or Date), and format (only if the selected data type is Date or Date and Time). 
        4. Similarly, define the other subfields. 
      3. In the Format field, select the date and time format for the Date or Date Array data type. This field is applicable only for Date or Date Array data types.
      4. In the Occurrence field, enter the number of array field values or sets of array field values. This field is applicable only for array data types.
      5. Click Save to save the record definition.

        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
  10. Click Save Layout to save the text layout.