Generate Metadata for existing Table(View)

You can easily generate metadata for existing table or view in the system by sending a post request as below. This will not create a physical table in the database but will only create its metadata as per its structure. Neither anything is added in the source table/view nor removed.

This service will not only introduce new business object with its attributes but will also fetch the parent/child relationship (recursive relationships as well) along with unique constraints to be saved in the respective destinations.

Following are the conditions which should be met to introduce a new business object.

  1. As you are going to reverse engineer existing table/view to add the retrieved metadata therefore the main request will be of type BUSINESS OBJECT.

  2. Attribute BO_NAME has the value \{{boName}}. \{{boName}} is the placeholder for the existing table/view which is going to be added as a new business object name in the system. The value can have space in it. This table/view should already exist in the system as we are reverse engineering the same to extract metadata. Although this field is case insensitive but it is preferred that you define it all letters with upper case.

  3. BO_DISPLAY_NAME is the display name of the business object and can be in any case but should be used in camel case.

  4. Value of the attribute ENTITY will be the name of the physical table in database and it should not have space in. It should also be unique and should be in upper case letters.

  5. BO_DESC is the description field for this new business object. You can have some intro about this business object its purpose and its usages etc.

1. Request URL

/{PDM Server domain}/metadata/write/generateMetadataForExistingTable

Method: POST

2. Request headers

Name Value

Content-Type

application/json

3. Request body

{
    "BUSINESS OBJECT": {
        "language": "en",
        "readBack": true,
        "timezone": "GMT+08:00",
        "showSQLStats": true,
        "data": [
            {
                "BO_NAME": "{{boName}}",
                "BO_DISPLAY_NAME": "{{boName}}",
                "ENTITY": "{{boName}}",
                "BO_DESC": "{{boName}}"
            }
        ]
    }
}

Try it myself

4. Responses

{
    "status": {
        "statusCode": 1,
        "statusLabel": "Success"
    },
    "messages": [
        {
            "message": "1 business objects(s) metadata generated successfully.",
            "status": {
                "statusCode": 1,
                "statusLabel": "Success"
            }
        }
    ],
    "exception": {},
    "data": {},
    "version": "0.0.0.0A",
    "threadName": "**system_52184",
    "requestTime": "2021-06-01 13:03:56.325 +08:00",
    "responseTime": "2021-06-01 13:03:57.053 +08:00"
}