Storage Conversion Using the Filler Node
Using the Replace condition of a Filler node, you can easily convert the field
storage for single or multiple fields. For example, using the conversion function
to_integer
, you could convert income from a string to an integer using the
following CLEM expression:
to_integer(income)
.
You can view available conversion functions and automatically create a CLEM expression using the Expression Builder. From the Functions drop-down list, select Conversion to view a list of storage conversion functions. The following conversion functions are available:
-
to_integer(ITEM)
-
to_real(ITEM)
-
to_number(ITEM)
-
to_string(ITEM)
-
to_time(ITEM)
-
to_timestamp(ITEM)
-
to_date(ITEM)
-
to_datetime(ITEM)
Converting date and time values. Note that conversion functions (and any other functions that require a specific type of input such as a date or time value) depend on the current formats specified in the stream options dialog box. For example if you want to convert a string field with values Jan 2003, Feb 2003, etc. to date storage, select MON YYYY as the default date format for the stream.
Conversion functions are also available from the Derive node, for temporary conversion during a derive calculation. You can also use the Derive node to perform other manipulations such as recoding string fields with categorical values. See the topic Recoding Values with the Derive Node for more information.