Dynamic data import / export


simply more productive
Up to 10,000 records can be processed with the freeware version!
  • Home
  • Documentation
  • Batch module, Executes Definition sets automatically and at scheduled times

Batch module, Executes Definition sets automatically and at scheduled times

Executes Definition sets automatically and at scheduled timesThe FlowHeater utility "FHBatch.exe" is a shell application that is controlled by command line parameters and/or control file parameters. You can execute any stored FlowHeater Definition with the batch module, without needing to use the Designer graphical interface to run it. For example, after having tested and saved a Definition set using Designer you can setup everything to run on a Windows Server with scheduled Windows tasks.

The batch module is ideal for a Definition conversion process that takes a long time to run or for frequently repeated tasks. Examples of these are the Import / Export / Update of large databases, which can be run as an overnight batch job, and the automatic creation of a testing data during a development project.

Example command line

FHBatch.exe /MaxRows 1000 C:\Temp\Import\Turnover.fhd

These parameters instruct FlowHeater to run the Definition set ImportTurnover.fhd but only process the first 1000 rows.

Note: If authorization is required to enable connection to a database ( SQL Server, Oracle, MySQL, etc.) for example, the necessary database, username and password details must be stored in the Definition set. For security reasons, all passwords saved in FlowHeater Definition sets are encrypted.

Exitcode / Errorlevel

To find out whether the execution of a FlowHeater Definition set was successful in a batch file script (.CMD / .BAT) you can test the exit code (ErrorLevel) immediately after FHBatch.exe (ErrorLevel = 0 means OK). 


@echo off

FHBatch.exe /MaxRows 10 YourDefinition.fhd
if %ERRORLEVEL% LSS 0 goto error

echo OK
goto end

echo error




  /? or /help

Outputs a help description

  /MaxRows n

At most only the first n records/rows are processed

  /SetParameter Name=Value

Sets the Parameter Name to the value entered.

  /SetParameter Name:Crypt=Value Sets the Parameter Name to the value entered. The content of this value must previously have been encrypted with the option /Crypt

  /Memory Enables the memory processing mode

  /Massdata Enables the mass data processing mode

  /LogFile [filename] Adds the result to the specified log file

  /ShowDebug Outputs debug messages to the shell standard output channel

  /DisableDebug Disables debug messages

  /ShowWarnings Outputs warning messages to the shell standard output channel

  /DisableWarnings Disables warning messages

  /Crypt Value Encrypts the value for subsequent use with the option /SetParameter Name:Crypt=Value


Options only for TextFile, Excel and XML Adapter

Using the /ReadFileName and /WriteFileName options in the TextFile, Excel and XML Adapters you can define which file should be read or written. If a different Adapter is present on the respective side, attempting to use this option will abort the run with an error message.

  /ReadFileName [filename] Overrides the default in the definition file. Wildcards like C:\Temp\*.csv are allowed!
  /WriteFileName [filename] Overrides the default in the definition file

As of version 2.x all the options you selected using Designer in the Test and Execute popup are saved within the FlowHeater Definition. You only need the options detailed above  when you wish to change the predefined options during batch execution.

e.g. You have a very large volume of data you wish to import/export. While you are setting up the Definition and testing it in the Designer, you select the option to process a maximum of 1000 records. This setting is nevertheless stored in the Definition file. If you now try to run this Definition using the Batch Module without making further changes, only the first 1000 records will be processed. So that the Batch Module processes the complete number of records available, you need to override the option /MaxRows with the value 0 in the task parameters. See example.

FHBatch.exe /MaxRows 0 import.fhd

This will process all available records/rows, regardless of the predefined setting in the Definition file.


Examples of usage

The batch module makes it is easy to export data on a regular basis, for example, every night you could export the day’s turnover figures into a CSV text file automatically. Further potential uses include taking flat files or test data, formatted with fixed column widths, and importing these on demand into an SQL Server database for testing purposes (a feature sure to bring a smile to your developers).

The following examples illustrate the batch module in action