Fixed Length Serializer
Fixed Length Serializer is useful when source data is stored in multiple fields and is to be converted to text format (store entire data in a single field). This is helpful in scenarios where you have to:
Store large datasets, so you compress the information in a single field
Transport volumes of data over a network
Sample Use-Case
In this case, we are using an Excel Workbook Source.
The source file contains customers’ ContactDetails.
To preview this data, right-click on the source object’s header, and select Preview Output from the context menu.
A Data Preview window will open, displaying the source data.
Now, we want to convert the information contained in multiple fields into a single field in text format.
Using Fixed Length Serializer
To get the Fixed Length Serializer object, go to Toolbox > Text Processors > Fixed Length Serializer, and drag and drop the object onto the designer.
You can see that the dragged-object contains a Text field and an Input sub-node which is currently empty.
Auto-map the source fields by dragging and dropping the top node of the source object, ContactDetails, onto the Input node of the Fixed Length Serializer transformation object.
Right-click on the object’s header and select Properties.
A configuration window will open, as shown below.
Check the options according to the contents and format of your source file.
In this example, both options have been checked, as the first row in the source file contains a header, and the data also contains multiple records.
Under the Builder Options, select the relevant type from the drop-down list. For this dataset, we will use One Record Per Input.
Click Next. This will open the Destination Fields screen, where you can see all the incoming fields from the source object.
Here you can delete fields, change their Header or Data Type, modify the string’s Start Position, define field Length, and customize the fields according to your requirements.
Click OK.
Right-click on the Fixed Length Serializer object, and select Preview Output.
A Data Preview window will open, displaying the serialized data.
To store this serialized output, write it to a destination file.
Right-click on the FixedLengthSerializer node, and go to Write to > Fixed Length File Destination. A Fixed Length File Destination object is added to the dataflow designer with a Text field auto-mapped to it.
Configure settings for the Fixed Length File Destination object.
Click on the Start Dataflow icon, located in the toolbar at the top, to create the destination file.
A Fixed Length File Destination file will successfully be created. You can find its link in the Job progress window.
Last updated