Type Converter Processor¶
The “Type Converter Processor” is installed with the Dataristix Application. The processor converts input values to a selected target type.
Use the Type Converter processor to, for example, send data to a generic topic of the ODBC connector to determine the database field type that is generated for the database or to convert to a data type that is the data type expected by the output connector.
If any input value is of “uncertain” quality then the output value will also be of uncertain quality.
If any input value is of “bad” quality or if the value cannot be converted to the target type then the output value will be of bad quality.
Add to Task¶
Add the “Type Converter Processor” to a task by dragging it from the “Build” panel onto the task’s “Task Builder” panel.
Configuration¶
Select the “Type Converter Processor” item in the “Task Builder” panel to view its properties.
You can change the following properties:
- Topic
- The title of the “Type Converter Processor” as it appears within the task builder.
- Target Type
- Select the desired target type from the “Convert To” dropdown menu. The target type
can be one of:
- “Boolean”, “True” or “False”
- “Byte”, unsigned byte (8 bits)
- “DateTime”, a date and time value, i.e. “2021-06-01 13:24:59”
- “Decimal”, a 128-bit number
- “Double”, a double precision floating point number
- “Guid”, a globally unique identifier in the form, i.e. “FE2EA588-BE48-42cb-A04B-7B1BFEB1B46A”
- “Int16”, a 16-bit signed integer
- “Int32”, a 32-bit signed integer
- “Int64”, a 64-bit signed integer
- “SByte”, a signed byte (8 bits)
- “Single”, a single precision floating point number
- “String” (text)
- “UInt16”, a 16-bit unsigned integer
- “UInt32”, a 32-bit unsigned integer
- “UInt64”, a 64-bit unsigned integer
Press the “Apply” button to commit your changes.
Example¶
The following example shows a task that that calculates the standard deviation of random inputs. The output of the Aggregation processor is of type “Double” (a double precision number). The Type Converter changes the type to “Single” (a single precision number) before storing the values into a file.
Note that you can connect multiple values to the Type Converter processor to convert all to the same target type.