When you want to create metadata by extracting from a flat file, you must click the corresponding item (). After that, a Flat file wizard opens.
In that wizard, you must type the file name or locate it with
the help of the button. Once you
have selected the file, you may also specify the
and options as well. Default
is ISO-8859-1
and default is
delimited.
If the fields of records are separated from each other by some delimiters, you may agree with the default as the option. If the fields are of some defined sizes, you need to switch to the option.
After selecting the file, its contents will be displayed in the Input file pane. See below:
After clicking , you can see more detailed information about the content of the input file and the delimiters in the Metadata dialog. It consists of four panes. The first two are at the upper part of the window, the third is at the middle, the fourth is at the bottom. Each pane can be expanded to the whole window by clicking the corresponding symbol in its upper right corner.
The first two panes at the top are the panes described in Metadata Editor. If you want to set up the metadata, you can do it in the way explained in more details in the mentioned section. You can click the symbol in the upper right corner of the pane after which the two panes expand to the whole window. The left and the right panes can be called the Record and the Details panes, respectively. In the Record pane, there are displayed either (for delimited metadata), or (for fixed length metadata) of the fields or both (for mixed metadata only).
After clicking any of the fields in the Record pane, detailed information about the selected field or the whole record will be displayed in the Details pane.
Some Properties have default values, whereas others have not.
In this pane, you can see Basic properties ( of the field, of the field, after the field, of the field, , value of the field, Skip source rows, Description) and Advanced properties (, , , , EOF as delimiter). For more details on how you can change the metadata structure see Metadata Editor.
You can change some metadata settings in the third pane. You
can specify whether the first line of the file contains the names of
the record fields. If so, you need to check the Extract
names checkbox. If you want, you can also click some
column header and decide whether you want to change the name of the
field (Rename) or the data type of the field
(Retype). If there are no field names in the
file, CloverETL Designer gives them the
names Field# as the default names of the
fields. By default, the type of all record fields is set to
string. You can change this data type for any
other type by selecting the right option from the presented list.
These options are as follows: boolean,
byte, cbyte,
date, decimal,
integer, long,
number, string. For more
detailed description see Data Types and Record Types.
This third pane is different in Delimited and Fixed Length file. See:
At the bottom of the wizard, the fourth pane displays the contents of the file.
In case you are creating internal metadata, you only need to
click the button. If you are creating
external (shared) metadata, you must click the offered
button, then select the folder
(meta) and name of metadata and click
. The extension
.fmt will be added to the metadata file
automatically.
If you expand the pane in the middle to the whole wizard window, you will see the following:
You may want to specify what delimiter is used in the file (Delimiter). It can be comma, colon, semicolon, space, tabulator, or a sequence of characters. You need to select the right option. Finally, you need to click the button after which you can see the result of the new parsing of the file in the pane.
If you expand the pane in the middle to the whole wizard window, you will see the following:
You must specify the sizes of each field (Resize). You may also want to split any column, merge columsn, add one or more columns, remove columns. And you can change the sizes by moving the borders of the columns.