Command Line Utility for Generating Slice JSON (ODM)

A standalone command line utility called generateSliceJson.sh is provided that can run on lower environments to generate Slice JSON from the old XML (erwin XML or Database XML) and new XML (erwin XML or Database XML) file.

Slice utility compares the old XML (erwin XML or Database XML) and new XML (erwin XML or Database XML). Based on the checksum values:

  • If the checksum matches, it will ignore the JSON.
  • If the checksum values do not match, then the JSON (ODM) files are generated.

This utility does not have any dependency on OFSAA. It is used for converting OOB and the customized erwin XML or Database XML to JSON (ODM) files. 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 steps:

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

    generateSliceJson.sh <oldXmlPath> <newXmlPath> <destinationFolder> <modelname> <parserType>

    • <oldXmlPath> - The absolute path of the old erwin XML file or the absolute path of the old Database XML file.
    • <newXmlPath> -The absolute path of the new erwin XML or the absolute path of the new Database XML file.
    • <destinationFolder> - The absolute path of destination folder where the zip file(.ODM) will be created.
    • <modelName> - The model name must be provided. The ODM file is generated with the model name.
    • <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.

    Outcome after using the utility

    • The ODM is generated with the model name. The ODM is a sliced JSON that has the entity wise JSONS and a master xml, which contains the information about the entity wise JSON.

    For example:

    ODM:

    generateSliceJson.sh …/erwin/erwinXML/MDL_INTVL_PART_BASE_OLD.xml

    …/erwin/erwinXML/MDL_INTVL_PART_BASE_NEW.xml

    …/erwin/erwinXML X mdl_name

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