Parameter | Type | Description |
---|---|---|
password |
String | The password of the user. |
Parameter | Type | Default Value | Description |
---|---|---|---|
hostName |
String | localhost | Name or IP address of database system where the destination table would be created. If this parameter is missing, the default value will be "localhost". |
port |
int | 5432 | Port for communicating with the database system where the destination table would be created. If this parameter is missing, the default value will be "5432". |
database |
String | SIEM | The name of the database in the database system where the destination table would be created. If this parameter is missing, the default value will be "SIEM". |
userName |
String | appuser | Name of the database user to login to the database system where the destination table would be created. If this parameter is missing, the default value will be "appuser". |
dbPlatform |
String | postgresql | This is the platform of the database system where the destination table would be created. It may be <strong>postgresql</strong>, <strong>oracle11g</strong> or <strong>mssql2008</strong>. If this parameter is missing, the default value will be "postgresql". |
Object type: Table Sql creation | ||
---|---|---|
Information on what table sql to create | ||
Field | Required | Description |
columns | false | This is a nested JSON object that specifies the table columns for the table. Note that it contains a single internal field <B>column</B> that is an array of <B><Column></B> objects. See below for description of fields in Column objects. |
okToCreateSyncStateTable | false | This is a flag that indicates whether to return the SQL for creating a sync state table in the destination database. |
table | false | This is a nested JSON <B><Table></B> object that specifies the destination table that would be created. See below for description of fields in Table objects. |
tableIndexes | false | This is a nested JSON object that specifies the indexes for the table. Note that it contains a single internal field <B>tableIndex</B> that is an array of <B><Table Index></B> objects. See below for description of fields in Table Index objects. This field is optional. If missing, no indexes will be created. |
Object type: Table Sql columns creation | ||
---|---|---|
Information on what table fields sql to create | ||
Field | Required | Description |
indexSpace | false | Name of the tablespace in the destination database where the table indexes (if any) are to be created. NOTE: If this field is missing, tablespace specification for indexes will not be included in the returned SQL. |
schemaName | false | Name of the schema for the destination table that would be created. NOTE: This is an optional field. It will not be included in the returned SQL if omitted. |
tableName | false | Name of the destination table that would be created. |
tableSpace | false | Name of the tablespace in the destination database where the destination table would be created. NOTE: If this field is missing, tablespace specification for the table will not be included in the returned SQL. |
Object type: Table Sql columns creation | ||
---|---|---|
Information on what table columns sql to create | ||
Field | Required | Description |
columnName | false | Name of column in the destination table that would be created. |
columnSize | false | Size of database column. NOTE: This only applies if the database column is a VARCHAR. |
columnType | false | Data type of database column. Should be a java.sql.Types value (BIGINT, VARCHAR, etc.). |
nullable | false | Flag indicating whether database column can have null values. 0=Nulls not allowed, 1=Nulls allowed, 2=Unknown if nulls allowed. |
Object type: Table Sql index columns creation | ||
---|---|---|
Information on what table index columns sql to create | ||
Field | Required | Description |
indexColumns | false | This is a nested JSON object that specifies the index columns. Note that it contains a single internal field indexColumn that is an array of <Index Column> objects. See below for description of fields in Index Column objects. |
indexName | false | Name of index to be created for the destination table. |
unique | false | Flag (true or false) indicating whether the index is a unique index. |
Object type: Table Sql index creation | ||
---|---|---|
Information on the index columns sql to create | ||
Field | Required | Description |
columnName | false | Name of index to be created for the destination table. |
sortSequence | false | Value indicating whether the column values are to be sorted in ascending or descending order. A value of "A" should be used for ascending, and a value of "D" should be used for descending. This may be omitted if neither ascending or descending is applicable. |
Object type: Create Table SQL | |
---|---|
SQL statement that matches the requested create table request | |
Field | Description |
value | This field contains the SQL statement that would be used to create the table, as well as any SQL statements that would be used to create indexes for the table. Also, it will include the SQL needed to create the sync status table if the okToCreateSyncStateTable field is "true" in the request. |
POST /datasync/table?hostName=164.99.19.125&port=5432&userName=appuser&password=star1111&dbPlatform=postgresql
{ "table": {<Table>}, "columns": {"column":[{<Column>},{<Column>}...]}, "tableIndexes": {"tableIndex":[{<Table Index>},{<Table Index>}...]}, "okToCreateSyncStateTable": "true", } Table Fields { "schemaName": "my_schema", "tableName": "my_event_table", "tableSpace": "tablespace1", "indexSpace": "tablespace2", } Column Fields { "columnName": "msg", "columnType": "12", "nullable": "1", "columnSize": "4000" } Table Index Fields { "indexName": "evt_id_index", "indexColumns": {"indexColumn":[{<Index Column>},{<Index Column>}...]}, "unique": "true" } Index Column Fields { "columnName": "evt_id", "sortSequence": "A" }
{ "value": "CREATE TABLE my_event_Table ....." }