Create a Flat File Schema to instruct the CIC Studio how to format data it reads from or writes to a single-format Flat File.
You must have sample data in the Studio to use the Create from Sample option. Cleo recommends creating a new folder called samples in your Project at the same level as the src and META-INF folders to hold sample data.
- Select File > New > Flat File Schema from the main menu.
Note: If you select the Package in which the Flat File Schema should reside before creating it, some parameters are automatically populated in the New Flat File Schema window.
- The New Flat File Schema window appears. Choose Create From Sample from the Create radio button options. Click Next.
- Either type a file path in the File Name parameter or click Browse to produce the Select File window. Once you've selected a file, click Next.
- The Fixed Length or Delimited panel appears. The Studio automatically detects for the parameters below, but you should double-check the values.
- If the file is Fixed Length, choose Fixed Length from the Flat File Type radio buttons.
- If the file is Delimited, choose Delimited from the Flat File Type radio buttons. If the Delimiter parameter is incorrect, type the correct delimiter. If using one, type an escape character in the Escape Wrap Character field.
-
If the file is fixed-length, the Alter Fields panel appears.
- If you need to readjust a field, click the field header (ex. Field2) and change the number in the Field Length field.
- If you need to add a field, click the header of the field you want to precede the additional field, then click the Insert a field button.
- If you need to remove a field, click the header of the field you want to remove, then click the Remove a field button.
Note: Always adjust fields from left-to-right. Adjusting a field affects the length of the field to the right of it, so if you don't start with the leftmost field and go in order, you'll have re-adjusting to do.
Click Next.
- Click Next. The Record ID panel appears. Make sure the Multiformatted Flat File checkbox is not selected.
- Click Next. The Field Names and Data Types panel appears.
- In the table, click the Field1 header. Make sure it stays highlighted.
Note: You can click and drag the column lines to make them larger for easy readibility if the data is truncated.
- Under Field Properties, in the Field Name: field, type a label for the column. (For example, FullName, Quantity, etc.)
- Under Field Properties, in the Data Type: drop-down, specify the type of data that appears in that column. The Studio automatically detects the data type, but if you must change it, options are:
- Integer: A whole number
- Decimal: A number that contains decimal points
- Boolean: A true or false value
- String: A string of characters containing letters
- Repeat steps a through c for each Field header in the table.
Click Next.
- In the table, click the Field1 header. Make sure it stays highlighted.
-
If the file is delimited, the Transformation Settings section appears. Select a radio button to specify the role this file will play during transformation. Options are:
- Source: The Schema will be used to format the input documents for transformation
- Target: The Schema will be used to format the transformation's output documents
- Both: The Schema will be used to format both input and output documents
- None: The Schema will not be used in transformation, therefore Transformation Settings are not needed.
- Provide the Source folder, Package, and Name. Click Finish. The Flat File Schema's editor appears.
Next: Changes can made to your Flat File Schema in its editor.
To use the Schema, select it when creating Rulesets.
Comments
0 comments
Please sign in to leave a comment.