Liquid Data Mapper is a powerful data mapping tool supporting advanced transformation of data in a variety of formats such as CSV, Database, EDI, JSON, Web Services and XML.
Using the Cast Component
The Cast Component provides a mechanism for converting data types which cannot be automatically converted.
For example, in EDI the 'Date of preparation' field requires a 6 digit date such as '170621'.
However, if we connect a Const Component with this sting value we will see an error message when we run the transform:
'The format of the value '170621' is incorrect for casting from a String to Date.
In order to support this we can use the Cast Component.
Cast Component Properties
Now when we run the transform, the string value is correctly written in the required EDI date format.
Please see the data mapper documentation for additional information about casting various data types in Liquid Data Mapper.
Download a Free Trial of Liquid Data Mapper: