OMrun Help
Version 4.x
Version 4.x
  • Introduction
    • Features
      • 📊Facts
      • 🔢Figures
    • System Requirements
    • Terms and Definitions
    • Release Notes
      • 📄Version 4.2
      • 📄Version 4.1
      • 📄Version 4.0
    • ❓Getting Help
  • Installation
    • ↘️Install OMrun
      • 📃OMrun Paths
      • 🔑License Key
    • ✔️Verify Setup
    • 🗑️Uninstall OMrun
  • Configuration
    • Data Adaptor
      • Data Queries
    • Program Adaptor
    • Dashboard Configuration
    • Customize own adapter
      • Own data adapter
      • Own program adapter
    • Configuration Files
      • PublishConfig.cfg
      • OMrunDataProvider.cfg
      • OMrunGuiProvider.cfg
      • OMrun.exe.config
    • Using Variables
      • OMrun Variables
      • Environment Variables
      • Parameter
  • Start OMrun
    • Start via Desktop
    • Start via Batch File
    • Start via Task Scheduler
  • Menu Functions
    • ▶️Button Execute
    • ⏹️Button Stop
    • 🎓Button License
    • ⚙️Button Configuration
    • 📥Button Export
    • ❓Button Help
    • 📌Button About
    • 🗂️Button Windows
    • ⏩Shortcuts and Functions
  • Element Overview
    • Navigation Tree
    • Business System
    • Component
    • Environment
    • Scenario
    • Test Data Object
      • Query
      • Body
      • Business Mapping
    • Test Program Object
      • Batch
      • CSV Converter
      • Data Staging
      • Housekeeping
      • Json Converter
      • Program
      • RTL Generator
      • XML Converter
      • XML Converter XL
    • Parameter List
  • Result Analysis
    • Color Codes
    • OMrun Test Results
    • Excel Result Reports
    • OMdashboard
Powered by GitBook
On this page
  • Abstract
  • Input
  • Database Multi Deletion
  • Database Single Conversion
  • Flatfile Single Conversion
  • Flatfile Multi Conversion
  • Output
  1. Element Overview
  2. Test Program Object

Json Converter

PreviousHousekeepingNextProgram

Last updated 1 year ago

Abstract

Plug-in to import Json files "json" into the built-in test database or/and convert it into "csv" flat files within OMrun.

The system works with the following data formats:

  • *.json (Standard json file structure {.....} )

  • *.json (DB extract json file structure [{.....}] )\

The Jsonplug-in supports 4 different types of conversation:

  • Database Multi Deletion Deletes all data tables in the built-in test database of OMrun.

  • Database Single Conversion Loads a json file into the built-in test database of OMrun. Deletes tables with the same system prefixes in advance.

  • Flatfile Single Conversion Converts a json file into a csv output file.

  • Flatfile Multi Conversion Converts all json files within a defined directory to csv output files.

Creates a header file for every unique named loaded json file. The header file allows to get fix attribute names, even the load does import different struktures for the same schema. It is possible to write a consisent query that does not change. It is possible to delete attributes from the header list which are of no interest. They are not loaded anymore.

Every json file load creates a query to read the loaded content and the schema of the loaded xml structure. (Single Conversion only)


Input

Execution parameters to invoke a conversion:

Database Multi Deletion

@param1 = <Empty> @param2 = <Empty> @param3 = <Empty> @param4 = <Empty>

Database Single Conversion

Field @param1 (Input file) [mandatory]

  • Description: Source location incl. file name + extension

  • Syntax: <full path>\<file name>.json

  • Example: "c:\Input\Data\Test.json"

Field @param2 (System prefix) [optional]

  • Description: System prefix name used as prefix for table names

    • <Empty> uses standard prefix "SourceA".

    • <System prefix> uses defined system prefix, max. char lenght 20

  • Example: Nest_Person, OMrun_Person etc.

Field @param3 = <Empty>

Field @param4 = <Empty>

Flatfile Single Conversion

Field @param1 (Input file) [mandatory]

  • Description: Source location incl. file name + extension

  • Syntax: <full path>\<file name>.json

  • Example: "c:\Input\Data\Test.xml"

Field @param2 (Output path) [mandatory]

  • Description: Target location of converted files

  • Syntax: <full path> (without ending backslash)

  • Example: @TestCases\OMrun\Mapping_Business_Rules\Convert_Result_Before_Verify

Field @param3 (Output file) [optional]

  • Description: Target file name + extension

  • Syntax: <file name>.<extension> (without backslash at beginning)

  • Example: Result_Ready2Verify_Amber.csv

  • Possible values:

    • <file name>.csv

    • csv (taking input file name and converting into csv)

    • * [or] <empty> (default = File name from @param1 and converted into csv)

Field @param4 (Header definition file) [optional]

  • Description: File (csv) with all headers generated from Json file

  • Syntax: <file name.csv>

  • Example: Filename_HeaderDefinition.csv

  • Possible values:

    • <header definition file name.csv> (= File will be converted with this header definition file)

    • * [or] <empty> (=No value converts each file with its own header file generated)

Flatfile Multi Conversion

Field @param1 (Input file) [mandatory]

  • Description: Source location without file name

  • Syntax: <full path>

  • Example: "c:\Input\Data", "c:\OMrun\Results"

Field @param2 (Output path) [mandatory]

  • Description: Target location of converted files

  • Syntax: <full path> (without ending backslash)

  • Example: @TestCases\OMrun\Mapping_Business_Rules\Convert_Result_Before_Verify

Field @param3 = <Empty>

Field @param4 = <Empty>


Output

The converted file contains 2 additional attributes in front of all other attributes:

  • FileName_0 (original file name of Json input file without extension)

  • Id_1 (record id of Json input file)

Output format of the CSV file will be ANSI by default. Different formats could be set in config file (admin rights needed): C:\Program Files\OMIS\OMrun\BuiltInTests\OMrunPlugIn_JsonConverter.exe.config

Encoding CSV Output Format- It is possible to define the encoding for the csv file:

  • UTF8 [with BOM]

  • UTF8 without BOM (Default)

  • ANSI

  • UTF7

  • UTF32

  • ASCII

  • BigEndianUnicode

  • Unicode

https://en.wikipedia.org/wiki/JSON