Search

Home

Home

CONVERT FORMAT TO BITS

CONVERT FORMAT TO BITS

The CONVERT FORMAT TO BITS operator allows you to convert text data contained in a selected bit of the input data bus into a proper data bus structure.

The processed bit can contain data in one of the supported text formats, such as:

  • JSON – JavaScript Object Notation
  • XML – Extensible Markup Language
  • CSV – Comma-Separated Values
  • XLSX – Microsoft Excel (OpenXML format)

For the formats listed above, the operator provides built-in functionality for automatically decoding the data structure and mapping it into records and bits of the output data bus.

The operator provides a User format mode for data stored in other formats, such as:

  • HTML
  • EPP
  • EDI (e.g., EDIFACT, X12),
  • custom text structures.

In this mode, you can manually define the decoding structure using the Text-to-Bus-Bits Conversion EditorText-to-Bus-Bits Conversion Editor, where you configure text interpretation rules, data nesting, and mappings to specific bits and data types.

Each record in the resulting output data bus is created according to the data nesting logic — meaning that a single text structure can be split into multiple records while preserving hierarchical data relationships.

Example project using the CONVERT FORMAT TO BITS operator:

image

OPERATOR CONFIGURATION

The operator processes the specified text bit of the input bus. The result of the operation is a new output bus constructed based on the data extracted from the processed text format.

icon
The data conversion will be performed independently for each record of the input bus. The output bus, in turn, will consist of the combined results of all processed records.

The way you configure the operator depends on the data format you intend to process with it.

You can choose from three data formats:

image
  • XLSX file → Allows you to process Excel files. However, the file must consist only of data in table form.
  • CSV file → Allows you to process data from CSV files.
  • XML file → Allows you to process data contained in XML format.
  • icon
    This situation often occurs when you receive a response from a REST API and need to decode the returned data. In most cases, the service you call returns data in JSON format.
  • JSON file → Allows you to process data contained in JSON format.
  • User format → Allows you to process data in any text format by configuring markers in the text that correspond to data positions and data groups.

Regardless of the format you intend to convert, you must specify the bus bit that stores the text in the selected format (Column with text format) and decide how to build the output bus (Result target for decoded data).

  • Create a busbar from the result → A completely new data bus will be created, consisting only of the data decoded from the text.
  • Add to existing busbar without source bit → The decoded data will be appended to the existing bus. The bus will consist of the bits entering the operator and the bits created during text decoding.
  • Add to existing busbar → Works the same as the previous option, except that the decoded text field is not passed to the output bus.
image
icon
For both the Add to existing busbar without source bit and Add to existing busbar, if decoding the text field produces more than one record, the bit values from the input record will be replicated in all records generated from the decoded text field.

The configuration scheme for XLSX, CSV, XML and JSON is identical to that of the INPUT FILEINPUT FILE operator and is described in detail elsewhere.

The configuration scheme for the User format requires you to enter a sample of the text to be converted in the Text template field. This enables you to perform a conversion test on the component.

In the File format tab, you have to specify the separators used for data position markers in the text being converted, and then run and perform the text conversion using the Text-to-Bus-Bits Conversion EditorText-to-Bus-Bits Conversion Editor.

image

After creating the conversion scheme in the editor, the schema field will be automatically populated. You can also edit it manually here without using the editor.

You can now test the conversion for the text entered in the Text template field by clicking the Test button.

image

Result for the text defined in the Text-to-Bus-Bits Conversion EditorText-to-Bus-Bits Conversion Editor:

image

Next, go to the Columns tab, where you will generate the output bus bits for the defined text conversion scheme.

image

The system automatically adjusts the data types of the bits based on the sample text. If necessary, you can modify the bit type or name by clicking the corresponding field.

image