Creating a Custom Table Schema
This topic provides how to create the custom table.
POST--/pem/sql-service/config is used to create a custom table schema.
This example shows how to create a custom table named CUSTOMER containing the following fields:
- CUSTOMER_ID
- CUSTOMER_NAME
- CUSTOMER_ADDRESS
- CUSTOMER_PHN
Sample JSON:
Input: {
,"columnName1":"CUSTOMER_ID"
,"columnName2":"CUSTOMER_NAME"
,"columnName3":"CUSTOMER_ADDRESS"
,"columnName4":"CUSTOMER_PHN"
."distinctColumnName":"CUSTOMER_NAME"
# Used to perform distinct or unique operations on named column
,"seqId":1,
# To match table configuration for API reference
,"tableName":"CUSTOMER"
,"whereColumnName1":"any column name from table"
# To perform filter operations
,"whereColumnName2":"any column name from table"
,"whereColumnName3":"any column name from table"
}
Result:
CUSTOMER (table name) | |||
CUSTOMER_ID (1st column name) |
CUSTOMER_NAME (2nd column name) |
CUSTOMER_ADDRESS (3rd column name) |
CUSTOMER_PHN (4th column name) |