Format Designer - delimited files
To create a new data format for a delimited file:
- Click Format Designer on the toolbar to open Format Designer.
-
From the
File menu select
New Format or click
Create a new Format on
the toolbar. The
New Format dialog is displayed.
- Classification
- Select Delimited file.
- Name
- Enter a unique name for the new data format.
- Description
- Enter a description for the new data format.
- Click OK.
-
Enter or amend the following details:
- Description
- The description entered for the data format.
- Initial lines to ignore
- The number of lines to ignore at the start of the external file. The default is 0.
- Field Separator
- The character used to separate fields in the delimited file.
Select
Comma,
Tab,
Space,
Windows New Line,
UNIX New Line or
Other.
Other allows you to enter specific
characters, for example ';' semi-colon.
Uwaga: If you select a comma as a field separator you must not use it as decimal separator.
- Record Separator
- The type of separator used at the end of each record in the
external file. Select
Windows New Line,
UNIX New Line or
Other.
Windows New Line is the default separator and is displayed in the script as
record-sep="\r\n"
, that is, carriage return and new line. Other allows you to enter specific parameters, for example\t
for tab. - File contains column headings
- Check this check box if the external file contains an initial line that defines the column headings (or field names). This is counted after the number of lines to be ignored.
- See also Read File below.
- Fields
- The field names that define the data in the external file. Click in a row marked with '*' asterisk to enter new field names. These must conform to XML syntax. For example, they cannot start with numeric characters. The field names must also be unique within the field set.
- Read File
- To import existing field names from an example file, click
Read File and
browse to the location of your file. The field names are extracted and inserted
into the rows, replacing any field names you have already defined.
Uwaga: To enable the Read File button you must check the File Contains Column Headings check box.Uwaga: All files being imported must be in UTF-8 format.
- Insert
- Click Insert to add an additional new row above the currently selected row.
- Delete
- Click
Delete to remove
the currently selected row.
To sort the order of the field names, select the field you want to move and click the up and down arrows.
- Click Save a Format on the toolbar, to save the data format to the database.
- Validate and test the data format.
- To view or edit the data format source code, see „Format Designer - editing code in text view”.