Was this helpful?
External Types
An external type represents a data format external to DataFlow used to represent values. An external type contains two pieces of information:
The DataFlow token type for values
A parser/formatter pair for converting between the token and external representation of values
External types are defined by implementations of the TextDataType interface.
A number of common text formats are defined in the TextTypes class; a full list of types is in Supported Text Types.
The PaddedTextType class adapts external types for use in fixed-width schemas, providing information about field width, alignment, and padding.
Null Indicators
Part of the parsing/formatting information for an external text type includes a string that is used to represent a NULL value. This string is called the null indicator. All of the predefined text types support specifying a null indicator.
String Conversion Behavior
String values in text present some ambiguity. In particular, there are two issues:
It is unclear how to interpret an empty field value. As it “contains” no data, it could be interpreted as NULL. However, an empty string is also a completely legitimate string value.
It is unclear whether leading and trailing whitespace is intended as being part of the field value or is simply padding.
To provide flexibility in interpretation, the string text type supports specifying the intended behavior in these cases. The StringConversion enumeration lists the supported behaviors. The four possible values are outlined in the following table:
 
empty means NULL
empty means empty
trim whitespace
NULLABLE_TRIMMED
TRIMMED
preserve whitespace
NULLABLE_RAW
RAW
Last modified date: 06/14/2024