Table Adapt Interface
Logic to Add and Replace table definition info from tables in a source (or target) database
POST/api/v6.1.0.4/hubs/{hub}/channels/{channel}/locs/{loc}/adapt/apply
| Query parameters | None |
| Request headers | None |
| Request body (JSON) | Prototype:
'tables_in_channel' ?: {
'tables' ?: ( hvrtables* )
'check_layout' ?:
'localize_datatypes' ?:
'delete_tables' ?: 'none' | 'not_in_db' | 'not_in_mapspec_or_not_in_db'
'ignore_diff' ?: (
'col_dropped'
| 'col_added'
| 'data_type_changed'
| 'data_type_family_changed'
| 'col_range_smaller'
| 'col_range_bigger'
| 'distrib_key_removed'
| 'distrib_key_added'
| 'unique_index_removed'
| 'unique_index_added'
| 'nulls_removed'
| 'nulls_added'
| 'encoding_changed'*
)
}
'add_tables' ?:
'add_table_group' ?: {
'group' ?:
'from_schema' ?:
}
'show_views' ?:
'mapspec' ?: {
'tables' : (
{
'schema' ?:
'pattern' :
'not_pattern' ?: | ( + )
}
| {
'schema' ?:
'base_name' :
}*
)
}
|
| Response headers | None |
| Response body (JSON) | Prototype:
'tables_in_channel' ?: {
hvrtable *: {
'schema' :
'base_name' :
'type' ?:
'deleted' ?:
'diff' ?: (
'col_dropped'
| 'col_added'
| 'data_type_changed'
| 'data_type_family_changed'
| 'col_range_smaller'
| 'col_range_bigger'
| 'distrib_key_removed'
| 'distrib_key_added'
| 'unique_index_removed'
| 'unique_index_added'
| 'nulls_removed'
| 'nulls_added'
| 'encoding_changed'*
)
}
}
'add_tables' ?: (
{
'schema' :
'base_name' :
'type' :
'table' : hvrtable
}*
)
|
| Status codes | ✅ 200 OK ❌ 400 Bad Request ❌ 404 Not Found: Channel does not exist |
| Required permissions | ReadWrite access level on hub |
| Events | Creates the following event Table_Definition_Adapt
'tables_in_channel' ?: {
'tables' ?: ( hvrtables* )
'check_layout' ?:
'localize_datatypes' ?:
'delete_tables' ?: 'none' | 'not_in_db' | 'not_in_mapspec_or_not_in_db'
'ignore_diff' ?: (
'col_dropped'
| 'col_added'
| 'data_type_changed'
| 'data_type_family_changed'
| 'col_range_smaller'
| 'col_range_bigger'
| 'distrib_key_removed'
| 'distrib_key_added'
| 'unique_index_removed'
| 'unique_index_added'
| 'nulls_removed'
| 'nulls_added'
| 'encoding_changed'*
)
}
'add_tables' ?:
'add_table_group' ?: {
'group' ?:
'from_schema' ?:
}
'show_views' ?:
'mapspec' ?: {
'tables' : (
{
'schema' ?:
'pattern' :
'not_pattern' ?: | ( + )
}
| {
'schema' ?:
'base_name' :
}*
)
}
|
Logic to compare table definition info with table layouts in a source (or target) db
POST/api/v6.1.0.4/hubs/{hub}/channels/{channel}/locs/{loc}/adapt/check
| Query parameters | None |
| Request headers | None |
| Request body (JSON) | Prototype:
'tables_in_channel' ?: {
'tables' ?: ( hvrtables* )
'check_layout' ?:
'localize_datatypes' ?:
'tables_not_matched_by_mapspec' ?:
'ignore_diff' ?: (
'col_dropped'
| 'col_added'
| 'data_type_changed'
| 'data_type_family_changed'
| 'col_range_smaller'
| 'col_range_bigger'
| 'distrib_key_removed'
| 'distrib_key_added'
| 'unique_index_removed'
| 'unique_index_added'
| 'nulls_removed'
| 'nulls_added'
| 'encoding_changed'*
)
}
'add_tables' ?:
'show_views' ?:
'fetch_extra' ?: ( 'sap_description' | 'sap_refs' | 'db_stats'* )
'mapspec' ?: {
'tables' : (
{
'schema' ?:
'pattern' :
'not_pattern' ?: | ( + )
}
| {
'schema' ?:
'base_name' :
}*
)
}
'mapspec_table_not_in_db_error' ?:
|
| Response headers | None |
| Response body (JSON) | Prototype:
'tables_in_channel' ?: {
hvrtable *: {
'schema' :
'base_name' :
'exists_in_db' ?:
'type' ?:
'matched_by_mapspec' ?:
'sap_unpack' ?: {
'inside_table_base_name' :
'inside_table_exists' ?:
}
'sap_description' ?:
'sap_refs_to' ?: (
{
'base_name' :
}*
)
'db_stats' ?: {
'num_rows' ?:
}
'diff' ?: (
'col_dropped'
| 'col_added'
| 'data_type_changed'
| 'data_type_family_changed'
| 'col_range_smaller'
| 'col_range_bigger'
| 'distrib_key_removed'
| 'distrib_key_added'
| 'unique_index_removed'
| 'unique_index_added'
| 'nulls_removed'
| 'nulls_added'
| 'encoding_changed'*
)
}
}
'add_tables' ?: (
{
'schema' :
'base_name' :
'type' :
'sap_unpack' ?: {
'inside_table_base_name' :
'inside_table_exists' ?:
}
'sap_description' ?:
'sap_refs_to' ?: (
{
'base_name' :
}*
)
'db_stats' ?: {
'num_rows' ?:
}
}*
)
|
| Status codes | ✅ 200 OK ❌ 400 Bad Request ❌ 404 Not Found: Channel does not exist |
| Required permissions | ReadOnly access level on hub |
| Events | Creates no events. |
Check table definition against the definition in a source (or target) database
POST/api/v6.1.0.4/hubs/{hub}/channels/{channel}/locs/{loc}/adapt/check/{table}
| Query parameters | None |
| Request headers | None |
| Request body (JSON) | Prototype:
'contexts' ?: ( * )
'localize_datatypes' ?:
'fetch_extra' ?: ( 'sap_description' | 'sap_refs' | 'db_stats'* )
|
| Response headers | None |
| Response body (JSON) | Prototype:
'schema' ?:
'schema_type' ?: 'configured' | 'discovered'
'base_name' :
'capture' :
'integrate' :
'key_mode' : 'explicit' | 'implicit' | 'duplicate_rows'
'source_tables' ?: ( table+ )
'source_for_tables' ?: ( table+ )
'exists_in_db' :
'diff' : (
'distrib_key_removed'
| 'distrib_key_added'
| 'unique_index_removed'
| 'unique_index_added'
| 'source_tables'*
)
'sap_unpack' ?: {
'inside_table_base_name' :
'inside_table_exists' ?:
}
'sap_description' ?:
'sap_refs_to' ?: (
{
'base_name' :
}*
)
'db_stats' ?: {
'num_rows' ?:
}
'cols' ?: (
{
'hvrcolname' ?:
'basecolname' ?:
'core' ?: {
'sequence' :
'key' ?:
'distrib_key' ?:
'data_type' :
'attributes' ?: {
'encoding' ?:
'nullable' ?:
'charlen' ?:
'bytelen' ?:
'prec' ?:
'scale' ?:
'timeprec' ?:
'dayprec' ?:
'yearprec' ?:
'bitlen' ?:
}
}
'with_col_props' ?: {
'sequence' :
'key' ?:
'distrib_key' ?:
'data_type' :
'attributes' ?: {
'encoding' ?:
'nullable' ?:
'charlen' ?:
'bytelen' ?:
'prec' ?:
'scale' ?:
'timeprec' ?:
'dayprec' ?:
'yearprec' ?:
'bitlen' ?:
}
'localize_type_change' :
'sql_data_type' ?:
'other_props' : {
'BaseName' ?:
'SoftDelete' ?:
'Extra' ?:
'CaptureExpression' ?:
'IntegrateExpression' ?:
'TimeKey' ?:
'CaptureFromRowId' ?:
'DistributionKey' ?:
'SurrogateKey' ?:
}
}
'from_db' ?: {
'sequence' :
'key' ?:
'distrib_key' ?:
'data_type' :
'attributes' ?: {
'encoding' ?:
'nullable' ?:
'charlen' ?:
'bytelen' ?:
'prec' ?:
'scale' ?:
'timeprec' ?:
'dayprec' ?:
'yearprec' ?:
'bitlen' ?:
}
'sql_data_type' ?:
'diff' : (
'data_type_changed'
| 'data_type_family_changed'
| 'col_range_smaller'
| 'col_range_bigger'
| 'nulls_removed'
| 'nulls_added'
| 'encoding_changed'*
)
}
'db_stats' ?: {
'num_distinct_values' ?:
}
}*
)
|
| Status codes | ✅ 200 OK ❌ 400 Bad Request |
| Required permissions | ReadOnly access level on hub |
| Events | Creates no events. |
POST/api/v6.1.0.4/hubs/{hub}/channels/{channel}/locs/{loc}/adapt/other_channels
| Query parameters | None |
| Request headers | None |
| Request body (JSON) | Prototype:
'tables' ?: (
{
'schema' ?:
'base_name' :
}*
)
|
| Response headers | None |
| Response body (JSON) | Prototype:
{
'schema' :
'base_name' :
'other_channels' : ( chn+ )
}*
|
| Status codes | ✅ 200 OK ❌ 400 Bad Request: Location is a file location without external tables |
| Required permissions | ReadOnly access level on hub |
| Events | Creates no events. |
POST/api/v6.1.0.4/hubs/{hub}/mapdoc/parse
| Query parameters | None |
| Request headers | None |
| Request body (JSON) | Prototype:
|
| Response headers | None |
| Response body (JSON) | Prototype:
'tables' : (
{
'schema' ?:
'pattern' :
'not_pattern' ?: | ( + )
}
| {
'schema' ?:
'base_name' :
}*
)
|
| Status codes | ✅ 200 OK ❌ 400 Bad Request |
| Required permissions | ReadOnly access level on hub |
| Events | Creates no events. |