Create new SAP HANA table

POST {{baseUrl}}/api/model/tables

Request Params

KeyDatatypeRequiredDescription
checkSecondaryDataSourceTablenullIf set to true, the API finds compatible tables in the project. If a compatible table is found, the compatible table object information is returned. The caller can call PATCH /model/tables/{tableID}/ to set a secondaryDatasources for the compatible table. If no table is found, a new table is created.

If set to false, a new table is created.

This parameter has no effect on creating a freeform SQL table. | | columnMergeOption | null | | Defines a column merge option. For example, say a project includes a table named Table1 and a column named C1 whose data type is char(1). You add Table2, which has a C1 column with char(4). To be consistent, columns' data types are modified in following ways:

reuse_any: Updates the column data type to use the most recent column definition. In the example above, the column data type for C1 is changed to char(4) since Table2 was added after Table1. reuse_compatible_data_type: Updates the column data type to use the data type with the largest precision or scale. In the example above, the column data type for C1 is changed to char(4), as defined in Table2. reuse_matched_data_type: Renames the column in newly added table to allow it to have different data types. In the example above, column C1 uses char(1) for Table1. Column C1 in Table2 is defined as a separate copy of C1 and uses char(4). This option can cause unwanted schema changes and should be used only when necessary. If this value is not set, use the option that set on DBRole catalog setting.

Available values : reuse_any, reuse_compatible_data_type, reuse_matched_data_type | | tablePrefixOption | null | | The following options define the table prefix:

none: do not set table prefix. add_default_prefix: this option applies the default prefix setting on warehouse catalog. add_namespace: create a prefix same with namespace. This param has no effect on a free form SQL table.

Available values : none, add_default_prefix, add_namespace | | fields | null | | A comma-separated, top-level field whitelist that allows the client to selectively retrieve part of the response model. By default, all fields are returned. If specified, extra filtering is applied, and for the top-level object (if the root model is an array, each array element), only the listed fields are kept in the response. For example, "information,logicalSize" keeps only the "information" and "logicalSize" fields, omitting all other fields in the top-level response model. |

HEADERS

KeyDatatypeRequiredDescription
X-MSTR-AuthTokenstring(Required)
X-MSTR-MS-Changesetstring(Required)