Running an export based on existing profile: run_export.bat/sh

Functionality

The run_export.bat/sh batch file is used to export data from the Expense Management system using a designer tool to configure export. Export profile is an XML document that can be created and maintained easily using a designer tool in SAT. The profile serves as a template and it defines how to export data by composition of these items:

  • Export Source - Defines the source of the data and is currently implemented by the BOb framework. The two main parts to define a source are:
    • BOb type - User can select a BOb when creating a new profile.
    • Conditions - These are the conditions with AND operators. Conditions can be applied to the source data.

    In the designer tool, the user is asked to select a source when creating a new profile. The application parameter 'export.sourceList' enables you to define which BObs can be selected.

  • Export Filter - Defines the data to be exported and not be exported. Export Filter is an expression to decide which data or a BOb instance is to be exported. As an expression, filter is a powerful supplement, which can define a much more sophisticated decision, to/than conditions in export source. Expression is evaluated in JVM so it is slower than conditions in export source.
  • Consolidation - Consolidates multiple data into one and defines fields by which multiple records are consolidated into one record, if these fields have same value. Consolidated field is expression which is fully configurable.
  • Export Format - Defines the export file format. There are three formats:
    • Delimiter Separated Values (DSV): Fields are separated by configurable characters such as comma. Separates records by configurable character such as line break. There are 3 different line types:
      • Line - Each line is mapped to each data (record).
      • Header - Only exported once before lines.
      • Footer - Only exported once after lines.

      Fields in line are expressions which can be configured.

    • Fixed Width Values: Fields are separated by fixed width which is configurable. Separates records by configurable character such as line break (same as DSV). There are three different line types same as those in DSV. Fields in line are expressions as same as those in DSV.
    • XML: Fields are available in the XML format. To support various XML customers, an XSLT can be configured to the required XML format.
  • Export Target - Defines the data destination after export. The current implementation supports a file only with these items:
    • Export File - File name with/without full path.
    • Encoding - Either system default or an explicit encoding.
    • Action - Overwrite existing file, Rename new file, Append existing file.

    Export profile is an XML document which could be fully editable in corporate data in SAT. A designer provides an easier way to edit profile. A 'Run for Test' option is used to test profile.

Running Export Profile

The background process ExportBkg is used to run the export profile and schedule the export of data. The user executing the process must be assigned the export:design/export:run role. Different profile names can be provided for each profile and must be separated by a comma.

The export profile can also be run using XMDBTool, using run_export.bat. It can be used in either of these ways:

  • run_export.bat -profileName <profile name>. Here the profile name is the name of the profile.
  • run_export.bat -profileFile <profile file>. Here the profile file is the profile XML file.