IBM Support

Transforming Logical Data model to JSON schema and Physical Data Model to JSON Schema in InfoSphere Data Architect

Product Documentation


Abstract

You can transform Logical Data model to JSON schema and Physical Data Model to JSON Schema in InfoSphere Data Architect.

Content

The JSON schema can be generated from data models as per the following features of JSON Schema version “draft-06”:

  1. Required:

    For more information, see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#page-10.

    Also, see an example. As per the older JSON Schema, see the following JSON Schema:

    However, as per the new JSON Schema, the Schema must be as follows:

  2. Schema references with $ref:

    For more information, see https://tools.ietf.org/html/draft-wright-json-schema-01#page-8

    Also, see an example. As per the older JSON Schema, see the following JSON Schema:

    Note: There must not be another property present if $ref is present.

 

  • Specific changes according to the requirements
    1. Maintain an order of attributes for Entity, and order of columns for Tables in JSON Schema:

      The model (logical and physical), in which the order of attributes or columns exist, should maintain the same order in JSON Schema.

      For Example, if there are two entities as below with their attributes:

      • Entity1 – (Attribute1, Attribute2,Attribute3)
      • Entity2 – (Attribute2, Attribute3,Attribute1)

      Then in generated JSON Schema, the order of Entity1 and Entity2 can be in any order. However, the order of their properties must be maintained in JSON Schema.

    2. Filter out the properties of the Entities or Tables from model:

      According to this feature, some properties can be skipped during transformation process to JSON Schema from model. When this feature was not available, and all the properties that were there in model, would appear in JSON Schema.

      To Skip an attribute from entity, go to the properties of that attribute, and in Annotation tab, provide a value. As the value is in a key value pair, the key will be “LDM.ATTRIBUTE.SKIP” and the value will be “true”.

      To skip a column from table, go to the properties of that column, and in the Annotation tab, provide the value. As the value is in key value pair, the key will be “PDM.COLUMN.SKIP” and the value will be “true”.

      Note: In InfoSphere Data Architect, two JSON Schemas are generated, one is older JSON Schemas (<filename.json>) and other is a new JSON Schema (<filename>_JS06.json).

 

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS9UM9","label":"IBM InfoSphere Data Architect"},"Component":"","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"9.1.4","Edition":"APAR 2","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
04 July 2018

UID

ibm10715905