Previous Topic Next topic Print topic


Merge Structured Files

Function:

This tool allows file contents of two or more structured file descriptors to be selectively merged into one. It parses all property values from the modeled file input parameters, and writes them into a single result file.

Result:

  • The merged result file will contain as many lines as all input files in total, in the same order as the modeled file input parameters.
  • Only values of properties modeled as “has property” relationships will be written into the output file, others will be ignored. This can result in input file descriptors that contain more properties than the output file descriptor.
  • Properties of the output file, which do not occur in any of the input files, will be set as empty values in the result file (e.g. “value1,value2,,value4”).
  • The result file type and property delimiter is dynamic, which means that type “InputStream” will create an input stream and type “Local_File” will create a local file on the machine, while values are separated by the modeled delimiter.

Use case:

Merge Structured Files can be used to create a merged AWM element list from the result of two or more separate tools.

Example:

The following simplified model example describes an action which is capable of creating an element list containing members from two different databases. It uses two tools, which each return a separate element list from a specific database. Merge Structured Files is used as the last tool of the action, which creates a merged result of both lists.

  • Action Descriptor “ACT_ListAllDatabaseMembers"
    • Tool Descriptor “TOOL_ListDB2Members"
      • Output file: “FILE_DB2Members"
    • Tool Descriptor “TOOL_ListSQLMembers"
      • Output file: “FILE_OracleMembers"
    • Tool Descriptor “Merge Structured Files"
      • Input file: “FILE_DB2Members"
      • Input file: “FILE_OracleMembers"
      • Output file: “FILE_AllDatabaseMembers"
Note: The input file descriptors in this example must have the attribute “Parameter From” set to “Previous_Tool”.

Parameters:

All parameters must be configured in the following way:

  • A “Target ID File” reference must be set.
  • Referenced file descriptors must have:
    • “Structure” attribute set to “Table”.
    • At least one modeled “has property” relationship.

If the tool is used to merge element lists, all referenced file descriptors must contain exactly one and the same element type property (property with the attribute “Special Property” set to “Element_Type”).

Parameter # I/O Type Description
1 [M] I File First file to be merged.
2 [M] I File Second file to be merged.
3...n [O] I File Any amount of additional file input parameters can be modeled (requirements same as parameter #1 and #2).
1 [M] O File Merged file result.
Previous Topic Next topic Print topic