DummyPreParser

Configuration file

None.

Class name

com.ebd.hub.datawizard.parser.DummyPreParser

Description


If you simply want to transfer data, without manipulating it, you would normally skip the parsing process by ticking off the checkbox no mapping. By doing so, you will not be able to set variables, invoke functions, or execute SQL statements. The DummyPreParser always provides the string dummy data, no matter what the input data is, which makes it possible to go through phase 3, 4 and 5. To do so, you only need to create one node with one field in the input structure, chose an appropriate match code for the input line and create a 1:1 mapping.

It is possible to invoke the DummyPreParser with or without an additional parameter.

Important note: If the DummyPreParser is selected and the profile is saved, the option "Data routing" and the document type "CSV" on the "Main settings" page are automatically selected.

Important note: If option Data routing is used on page "Main settings" , the DummyPreParser is automatically set, the document type CSV is selected and a fitting source structure is created.

DummyPreParser without additional parameter


Without an additional parameter (empty input field for additional parameters in profile), the preparser always provides the line dummy data in ISO-8859-1 encoding. This can be used if the input data does not have to, or cannot be parsed (e.g. binary data), and only needs to be sent as received or as received, unpacked.

DummyPreParser with additional parameter


The additional parameter is interpreted as a directory path to a text file. The content of this file will be used instead of the line dummy data, but only if the input data of the job have a size of 0 bytes. The encoding of the data is defined by the file encoding. In other words: The preparser returns the unchanged input data if it has at least a size of 1 byte. This also applies to data, which cannot be parsed, e.g. binary files like PDF files. If the input data is empty, the content of the text file will be used instead.

A possible use case would be if you want to read in and map a JSON file, for example. In case the incoming file is not empty, a normal mapping will be performed. If the incoming file is empty, you could use the DummyPreParser to get a default JSON file, which will then be read in and mapped instead . Important note: Since (as described above) after first selecting the DummyPreParser and saving the profile, the settings CSV and Data routing are automatically selected, you would to need to reselect the settings JSON and Mapping and save the profile again.