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 is scenarios where you have to:

  • Store large datasets, so you compress the information in a single field
  • Transport volumes of data over a network

In this document, we will learn how to use Fixed Length Serializer in Astera Centerprise.

Sample Use-Case

In this case, we are using an Excel Workbook Source.

1_data

The source file contains customers’ contact details.

To preview data, right-click on the header of source object and select Preview Output from the context menu.

4_preview

A Data Preview window will open, displaying the source data.

5_data_preview

Now, we want to convert the information contained in multiple fields into a single field in text format.

To perform this task, we will use Fixed Length Serializer object in Astera Centerprise.

Using Fixed Length Serializer

1. To get the Fixed Length Serializer object, go to Toolbox > Text Processors > Fixed Length Serializer.

2_toolbox

2. Drag-and-drop the Fixed Length Serializer object onto the designer.

3_object

You can see that the dragged-object contains a Text field and an Input sub-node which is currently empty.

3. Auto-map source fields by dragging-and-dropping top node of the source object, ContactDetails onto the Input node of transformation object – Fixed Length Serializer.

6_mapping

4. Right-click on the object’s header and go to Properties.

7_properties

A configuration window will open as shown below.

8_config_window

5. 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 header and the data also contains multiple records.

9_options

6. Under the Builder Options, select the relevant type from the drop-down list. For this dataset, we will use One Record Per Input.

10_builder

7. Click Next. This will bring you to the Destination Fields screen where you can see all the incoming fields from the source object.

11_layout

Here you can delete fields, change their Header or Data Type, modify Start Position of the string, define field Length and customize the fields according to your requirements.

Click OK.

8. Right-click on the Fixed Length Serializer object and select Preview Output.

12_PREVIEW

A Data Preview window will open, displaying the serialized data.

13_serializerd_data

To store this serialized output, write it to a destination file.

9. Right-click on FixedLengthSerializer node, go to Write to > Delimited File Destination.

16_delimited

A Delimited File Destination object is added to the dataflow designer with Text field auto-mapped to it.

15_destination

10. Configure settings for Delimited File Destination object.

Learn to configure settings for Fixed Length File Destination from here.

11. Click on the Start Dataflow button placed in the toolbar at the top to create the destination file.

17_start_dataflow