Field properties
- Basic Properties
- Padding and Trimming
- Delimiters
- Positional Properties
Basic Properties
The Basic Properties of a field are defined in the following table:
Property | Description |
---|---|
Name | Specifies the name of this field. Attention: The field name must be a valid node
name.
|
Type | Optional:
Specifies the field type used as a basis for the field. The Type list
is only active if a field type has been created. Attention: Selecting
a new type might reset some of the existing properties of the field
with the new settings.
|
Reset | Resets properties that have been set locally for this field to the values for the selected type. |
Type | Specifies one of the following data types for
the field:
|
Occurrences Optional | For delimited data, this check box specifies
that both the field and its delimiter can be omitted from the data.
For positional data there is no delimiter so just the field is just
omitted. If the field can be empty but the delimiter must be present,
then the field is considered required and this check box should not
be selected. Attention: When specifying the optional property
for a field, be careful not to create an ambiguous grammar for the
Flat File Schema. For more information, see Specifying Optional Fields and Records.
|
Repeat Minimum | Specifies the minimum number occurrences of the field. |
Repeat Maximum | Controls repetitions of this single field. Select
one of the following options:
Note: Multiple occurrences are only allowed when the parent node
has specified a repeat delimiter.
|
Padding and Trimming
- In the Read Flat File activity, when converting Flat File data to XML data, the characters of the Flat File field are trimmed before being placed into the corresponding XML field.
- In the Write Flat File activity, when converting XML data to Flat File Data, the characters of the XML element are padded before being placed into the corresponding Flat File field.
The Padding and Trimming properties of a field are defined in the following table:
Property | Description |
---|---|
Pad/Trim Character | Specifies the single character used to pad the
length of, or to trim from a field. In the Character text
field of the pane, enter a single character using one of the following
actions:
|
Pad to Length | Specifies the final length of data for the field
when converting XML data to Flat File Data in the Write
Flat File activity. The specified padding characters are
added to the data for the field up to this length. Typically the size
of the padding is the same as the field. Note: This value specified
in this field is not used while trimming Flat File data to XML data
in the Read Flat File activity.
|
Justification | Specifies how what side of the field is padded
or trimmed:
|
|
Delimiters
The Escape and Encapsulation Delimiters of a field are defined in the following table. These properties are only used if the parent record has the Delimited option selected for Structure property.
Property | Description |
---|---|
Escape Character | Specifies the single character used to escape
delimiters within the data of the field. During run time, the Integration
Appliance parses the character directly after this delimiter as a
character, not as a delimiter. In the Character text
field of the pane, enter a single character using one of the following
actions:
|
For example, how is the following record parsed when no escape character is defined and the delimiter of the record is a colon? 135:Caving: What You Really Need to Know:10 The preceding record would be parsed into
the following 4 fields:
135:Caving/: What You Really Need to Know:10 When this Flat File record is parsed with the escape character before the colon, the title is not broken up into two sections even though the record uses the colon as a delimiter. |
|
Dynamic Position | Specifies the character position, starting from
1, where the escape character is defined in the first record. The
escape character is determined at run time using the character found
at the specified character position. For example, how is the following
record parsed when no encapsulation character is defined and the delimiter
of the record is a colon? 135:Caving: What You Really Need to Know:10 The preceding record would be parsed into
the following 4 fields:
135:Caving/: What You Really Need to Know:10 The escape character is now equal to the 11th character in the record: the backslash character. When this Flat File record is now parsed with the escape character is equal to the backslash character, the colon after Caving does not break this field into two sections even though the record uses the colon as a delimiter. |
Write Default | Specifies the escape character to use when writing
this field as Flat File data. Write Default is
only used in the Write Flat File activity when
converting XML data to Flat File data. Write Default is
not used when converting Flat File data to XML data in the Read Flat
File activity. In the Write Default text
field of the pane, enter a single character using one of the following
actions:
For example, you wanted to escape the colon with a backslash in the <title>Caving: What You Really Need to Know</title>. XML element, when converting it to Flat File data, specify a backslash in the Write Default field. The run-time result for this field is the following string: Caving\: What You Need to Know The character position specified in the Dynamic Position field is not used when an XML element is converted to Flat File data. |
Encapsulation Character | Specifies a delimiter character to encapsulate
data in the field because the field could contain character(s) that
are being used to delimit this field in the parent record. In the Character text
field of the pane, enter a single character using one of the following
actions:
|
For example, how is the following record parsed when no encapsulation character is defined and the delimiter of the record is a colon? 135:Caving: What You Really Need to Know:10 The preceding record would be parsed
into the following 4 fields
135:"Caving: What You Really Need to Know":10 When this Flat File record is now parsed with the encapsulation character set to double quotation marks, the colon after Caving does not break this field into two sections even though the parent record uses the colon as a delimiter. The Integration Appliance reads all the characters between two encapsulation delimiters as characters rather than delimiters. |
|
Dynamic Position | Specifies the character position, starting from
1, where the delimiter is defined in the first record. The encapsulation
delimiter is determined at run time using the character found at the
specified character position For example, how is the following record parsed when no encapsulation character is defined and the delimiter of the record is a colon? 135:Caving: What You Really Need to Know:10 The preceding record would be parsed
into the following 4 fields:
135:"Caving: What You Really Need to Know":10 The encapsulation character is equal to the 5th character in the record: the double quotation mark character. When this Flat File record is now parsed with the encapsulation character is equal to the double quotation mark character, the colon after Caving does not break this field into two sections even though the record uses the colon as a delimiter. The Integration Appliance reads all the characters between two encapsulation delimiters as characters and not delimiters. |
Write Default | Specifies the encapsulation character to use
when writing this field as Flat File data. Write Default is
only used in the Write Flat File activity when
converting XML data to Flat File data. The Write Default is
not used when converting Flat File data to XML data in the Read
Flat File activity. In the Write Default text
field of the pane, enter a single character using one of the following
actions:
|
For example, you wanted to encapsulate the data found in the <title>Caving: What You Really Need to Know</title> XML element with quotation marks when converting it to Flat File data, specify the double quotation marks in the Write Default field. The runtime result for this field is the following string: "Caving: What You Need to Know" The character position specified in the Dynamic Position field is not used when an XML element is converted to Flat File data. |
Positional Properties
The Positional Properties of a field are defined in the following table. These properties are only active if the parent record has the Positional option selected for Structure property.
Field | Description |
---|---|
Field Offset | Specifies the number of characters to skip, starting from the end of the previous field, to reach the beginning of this field. |
Field Length | Specifies the length of the data for this field. |