Add

Tuesday, August 18, 2009

Dataport Design

You build the data model by designing data items. A data item corresponds to a table. When you are exporting data, each data item is iterated for all the records in the underlying table, and you can set up sort order, keys, and table views to use. You can decide whether each record should be written to the external file.
When you are importing data, the records read from the external file can be inserted into tables that correspond to the data items. You can examine the records before inserting them and you can specify:
1. If the records should be inserted.
2. If the records should be inserted automatically.
3. If the records that are already in the database should be overwritten or updated when a record with the same primary key is read from the external file.
Designing a dataport consists primarily of setting various properties. The following sections explain which properties to use, and how to use them.
Dataport componentDescription
Dataport descriptionA complete description of the dataport including how data is collected, how data is formatted when written to the output file, and so on. The dataport description is stored in the database.
Data itemA data item corresponds to a table in the database. You define data items so that you can retrieve information from the tables in the database. A dataport must contain at least one data item, and each data item defines one or more fields.
FieldA dataport field can be a field in a data item (a database table), a field in a file from which data is to be imported, or a source expression to be executed during import or export. Fields in the external file are defined either as having a fixed length, or as being delimited by certain characters that you define.
Request formA request form is a form that is run before the dataport is executed. The request form is used to gather requests and options from the user, for example, the name and location of the external file.
PropertyThe dataport itself, and data items, fields, and the request form have properties that characterize the object in some way. For example, the length and position of a field in a line during import, or whether the OnValidate trigger of a field should be executed when inserting imported data into a table.

The FileFormat property determines the format of the external file and defines how a record is read from or written to the file. The RecordSeparator property defines how the file is broken into records, and the FileFormat property then defines how to break each record into fields. Finally, the DataItemSeparator property defines how data items should be separated if the dataport has more than one data item.

No comments: