Command Line Utility for Transforming erwin XML to Database XML or JSON(ODM)

A standalone command line utility called TransformErwin.sh is provided that can run on lower environments to generate Database XML or JSON from the erwin XML file. This utility does not have any dependency on OFSAA. It is used for converting OOB and the customized erwin XML to Database XML or JSON. This utility is available at $FIC_HOME/utility directory. You can copy the utility to any machine and run the utility.

To run the utility directly from the console, perform the following section:

  1. Navigate to $FIC_HOME/utility/TransformErwin/bin folder or wherever the utility is.
  2. Execute TransformErwin.sh using the following command:

    TransformErwin.sh <ErwinFilePath> <outputFilePath> <parserType> <generateJson> <modelname>

    • <ErwinFilePath> or <databasexmlFilePath> - The absolute path of the erwin XML file or the absolute path of the Database XML file.
    • <outputFilePath> - Destination path to store the output XML file
    • <parserType> - Enter S for using the Saxon parser or enter X for using the Xalan parser. If this parameter is null, the Saxon parser is used.
    • <generateJson> - By defatult the value is null. If the value is true, then the JSON is generated in the ODM (Oracle Data Model) archive file format. If the value is null, then DB. XML is generated.
    • <modelName> - If generateJson is true, then model name can be provided.
    Outcome after using the utility
    • The ODM is generated with the model name. The ODM has the entity wise JSONS and a master xml, which contains the information about the entity wise JSON.
    • The Database XML is generated with the same name as erwin file being transformed with the prefix _DB. For example, erwin File Name: OFS_PFT_Datamodel.XML. Then the resulting DB XML is OFS_PFT_Datamodel_DB.XML.

    For example:

    DB XML:

    TransformErwin.sh …/erwin/erwinXML/MDL_INTVL_PART_BASE.xml …/erwin/erwinXML X

    JSON

    TransformErwin.sh …/erwin/erwinXML/MDL_INTVL_PART_BASE.xml

    …/erwin/erwinXML X true mdl_name

    Verify the log files located at $FIC_HOME/utility/TranformErwin/logs folder.