Complex To Generic
Overview
The Complex To Generic tool converts a complex record stream into a simple record stream by converting all field values into text. The output can be one of two forms:
Multi-field: a set of text fields that are sequentially numbered starting at
F1
. The number of generic fields is equal to the number of fields in the largest simple record in the schema. The fields are sized to hold the largest of all simple records' fields for that position. Fields are of type textvar, unless one of the corresponding fields is Unicode, in which case the corresponding field will be Unicode.Delimited: a single text field is produced that contains a CSV-style formatting of all fields of each simple record.
The Complex To Generic tool lets you visualize a complex record stream by sending the output to a Data Viewer for examination. You can also put a Filter tool configured with AnyError()
downstream to determine if there has been a conversion error on any of the input record's data.
Complex To Generic tool configuration parameters
The Complex To Generic tool has one set of configuration parameters in addition to the standard execution options.
Configuration
Parameter | Definition |
---|---|
Type | The type of data contained in the record stream: Multiple field or Delimited text. |
Escapement | If Type is specified as Delimited text, specifies how fields that contain the separator, quote, or escape characters are treated. If set to Quote, the field value is surrounded by quotes, and quote characters in the field are doubled. If set to Escape, special characters are preceded by the specified escape character. |
Escapement character | If Escapement is specified as Escape, specifies a character used instead of the quote to escape special characters (such as separators and the escape character itself) by preceding them with this character. |
Quote character | If Escapement is specified as Quote, specifies a character that surrounds the data when it contains any special character such as a separator or quote character. |
Separator | If Type is specified as Delimited text, specifies a character used to separate field values. |
Configure the Complex To Generic tool
To configure the Complex To Generic tool:
Select the Complex To Generic tool.
Go to the Configuration tab.
Specify the Type of data to be output from the record stream: Multiple field or Delimited text.
If you want | Do this |
---|---|
The fields of the complex records assigned to multiple output fields. | Choose Multiple field. There will be as many fields as needed for the largest complex record. Extra fields will be null for other record types. |
The fields of the complex records formatted into a single text field. | Choose Delimited text, and then specify how fields containing separator characters should be formatted to avoid ambiguity:
or
|
Optionally, go to the Execution tab, and then set Web service options.