Creating Positional Schema Activity

The Positional Schema activity defines the procedure to read data from a Positional file, and write data in a Positional file. User needs to specify the names and the positions of required fields in order to enable identification of those fields.
This feature is available in:

Enterprise

Premier

Professional

Express

√

√

√

√


Steps to create Positional schema

  1. On the Adeptia Suite homepage, click the Develop tab.
  2. Go to Services > Schema and then click Positional. The Manage Positional Schema screen is displayed (see Figure 258).

    Figure 258: Manage Positional Schema

  3. Click the Create New link. The Create Positional Schema screen is displayed.
  4. Enter the name and description for new Positional Schema in the textboxes Name and Description respectively.
  5. Data Header usually contains the titles of the fields in a text file. If data header is present in the text file, select the Data Header Present checkbox (see Figure 259).

    Figure 259: Create Positional Schema

  6. To define the schema using definition file, select the Import Definition File radio button; select the type of file from the dropdown list and click the Upload File button to select the required file. The Schema File upload screen is shown (refer to Figure 247).
  7. Click Browse and select the file, you want to upload.
  8. Now click the Upload File button. Name of the uploaded file is shown in the File Name list (see Figure 260).

    Figure 260: Uploaded File

  9. Click Finish to close the Schema File Upload screen and return to create schema page.
  10. If you want to create schema by entering the fields manually, select the Enter the Fields Sequentially radio button and follow the steps given below:
  11. Enter name and description of the field in the textboxes Name and Description respectively.
  12. Select the type of data from the dropdown list Type. For data type selection, refer to Table 2.
  13. If data type is Date, select the format of date and time from the dropdown lists DateFormat and TimeFormat respectively.
  14. To define field position select one of the following option:
    • Field Length
    • Start & End Positions
  15. To define the field position using field length, select the Field Length radio button and enter the length of the field in the Length field.
  16. To define the field position using start and end position, select the Start and End Position radio button.
  17. Enter the start position of the field in the StartPos field.
  18. Enter the end position of the field in the EndPos field.

     

    The starting position of a row in a positional file is 1.
    In a positional file, the schema counts the tab as one position and not eight positions. By default, creation of field positions is sequential. You can also create a schema with fields that are not in sequence. For details, refer to the Defining Field Positions Non-Sequentially section.

  19. Select the alignment of the field from the dropdown list Align.

    From Align select
     L if the field is left aligned.
     R if the field is right aligned.
     
    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.

  20. Select the Skip checkbox if you want to skip this field while generating the XML. This selection skips the fields that are not required for the schema. For example, the source file has over 1500 fields, but you just need to use 1000 fields. This selection skips the 500 unrequired fields, and does not read them, when the data is parsed to the XML. When the data file is created, the skipped fields are displayed in the file but are not read. If the schema is created using an existing XSD, the skipped fields will appear as a blank value. However, when the schema is used in other activities such as Mapping, all its fields are displayed.

    Skipping of unrequired fields is useful in case of a standard XSD with a large number of fields. This reduces the size of the generated XML that now contains only the required fields.
     
    While editing the schema, when you download the data file, the Adeptia Suite represents the skipped fields by 'T' and the unskipped fields by 'F' (refer to Figure 225). Similarly, while viewing the Print-Friendly Page, the Adeptia Suite represents the skipped fields by 'T' and the unskipped fields by 'F'.

  21. Click to expand Advanced Properties. Advanced properties of positional schema are displayed (see Figure 261).

    Figure 261: Advanced Properties of Positional Schema

  22. Disable the Handle CR/LF (Source Data) checkbox, 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.
  23. 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.
  24. Select the Data Truncation checkbox, 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.

  25. Select the Allow Less Fields checkbox, 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.
  26. 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 checkbox.
  27. 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.
  28. Click the Save button.

Â