Parser hdbsynonym - SAP-archive/xsk GitHub Wiki

Parser for hdbsynonym

The information on how to develop the design-time data-persistence model for an XSK application using the HDBSynonym syntax

Reference

  • SAP Help

https://help.sap.com/viewer/cc2b23beaa3344aebffa2f6e717df049/2.0.03/en-US/5278b5979128444cb6fffe0f8c2bf1e3.html

  • Sample Hana v1 and v2 syntax
{ "acme.com.app1::MySynonym1" : { 
       "target" : { 
            "schema": "DEFAULT_SCHEMA", 
            "object": "MY_ERP_TABLE_1"
                  },
       "schema": "SCHEMA_2"
       }
}
  • Which syntax is supported from the parser
hdbsynonym syntax (Hana 1) hdbview syntax (XSKSynonymParser) Comments
"<full.path.to.package>::" location
"target" : {"schema": "..."} targetSchema
"target" : {"object": "..."} targetObject
"schema" synonymSchema
  • Parser behavior (issue)
  • Currently the Parser do not take into account if a given property is mandatory.

  • If the property order is misplaced the parser will still parse the values.

  • If more than one value of one property is provided then only the last one is taken.

  • The following examples will be parsed:

{
  "kneo.test.db::Test.dvMySynonym1": {
    "target": {
      "schema": "SYS",
      "object": "DUMMY"
    },
    "schema": "TONI"
  }
}
{
  "kneo.test.db::Test.dvMySynonym1": {
    "schema": "TONI",
    "target": {
        "object": "DUMMY",
        "schema": "SYS"
    }
  }
}
  • Sample

...

  • Modules

https://github.com/SAP/xsk/tree/main/modules/parsers/parser-hdbsynonym

https://github.com/SAP/xsk/tree/main/modules/engines/engine-core/src/main/java/com/sap/xsk/hdb/ds/parser/hdbsynonym

  • Tests

https://github.com/SAP/xsk/tree/main/modules/parsers/parser-hdbsynonym/com.sap.xsk.parser.hdbsynonym/src/test/java https://github.com/SAP/xsk/tree/main/modules/engines/engine-core/src/test/java/com/sap/xsk/hdb/ds/test/XSKSynonymParserTest.java