Table Adapt Interface
Logic to Add and Replace table definition info from tables in a source (or target) database
POST/api/v6.1.0.26/hubs/{hub}/channels/{channel}/locs/{loc}/adapt/apply
| Query parameters | None |
| Request headers | None |
| Request body (JSON) | Prototype:
'tables_in_channel' ?: {
'tables' ?: ( hvrtables<str>* )
'check_layout' ?: <bool>
'localize_datatypes' ?: <bool>
'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' ?: <bool>
'add_table_group' ?: {
'group' ?: <ident>
'from_schema' ?: <bool>
}
'show_views' ?: <bool>
'mapspec' ?: {
'tables' : (
{
'schema' ?: <str>
'pattern' : <str>
'not_pattern' ?: <str> | ( <str>+ )
}
| {
'schema' ?: <str>
'base_name' : <str>
}*
)
}
|
| Response headers | None |
| Response body (JSON) | Prototype:
'tables_in_channel' ?: {
hvrtable<str> *: {
'schema' : <str>
'base_name' : <str>
'type' ?: <str>
'deleted' ?: <bool>
'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' : <str>
'base_name' : <str>
'type' : <str>
'table' : hvrtable<ident>
}*
)
|
| 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<str>* )
'check_layout' ?: <bool>
'localize_datatypes' ?: <bool>
'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' ?: <bool>
'add_table_group' ?: {
'group' ?: <ident>
'from_schema' ?: <bool>
}
'show_views' ?: <bool>
'mapspec' ?: {
'tables' : (
{
'schema' ?: <str>
'pattern' : <str>
'not_pattern' ?: <str> | ( <str>+ )
}
| {
'schema' ?: <str>
'base_name' : <str>
}*
)
}
|
Logic to compare table definition info with table layouts in a source (or target) db
POST/api/v6.1.0.26/hubs/{hub}/channels/{channel}/locs/{loc}/adapt/check
| Query parameters | None |
| Request headers | None |
| Request body (JSON) | Prototype:
'tables_in_channel' ?: {
'tables' ?: ( hvrtables<str>* )
'check_layout' ?: <bool>
'localize_datatypes' ?: <bool>
'tables_not_matched_by_mapspec' ?: <bool>
'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' ?: <bool>
'show_views' ?: <bool>
'fetch_extra' ?: ( 'sap_description' | 'sap_refs' | 'db_stats'* )
'mapspec' ?: {
'tables' : (
{
'schema' ?: <str>
'pattern' : <str>
'not_pattern' ?: <str> | ( <str>+ )
}
| {
'schema' ?: <str>
'base_name' : <str>
}*
)
}
'mapspec_table_not_in_db_error' ?: <bool>
|
| Response headers | None |
| Response body (JSON) | Prototype:
'tables_in_channel' ?: {
hvrtable<str> *: {
'schema' : <str>
'base_name' : <str>
'exists_in_db' ?: <bool>
'type' ?: <str>
'matched_by_mapspec' ?: <bool>
'sap_unpack' ?: {
'inside_table_base_name' : <str>
'inside_table_exists' ?: <bool>
}
'sap_description' ?: <str>
'sap_refs_to' ?: (
{
'base_name' : <str>
}*
)
'db_stats' ?: {
'num_rows' ?: <int64_ascii>
}
'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' : <str>
'base_name' : <str>
'type' : <str>
'sap_unpack' ?: {
'inside_table_base_name' : <str>
'inside_table_exists' ?: <bool>
}
'sap_description' ?: <str>
'sap_refs_to' ?: (
{
'base_name' : <str>
}*
)
'db_stats' ?: {
'num_rows' ?: <int64_ascii>
}
}*
)
|
| 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.26/hubs/{hub}/channels/{channel}/locs/{loc}/adapt/check/{table}
| Query parameters | None |
| Request headers | None |
| Request body (JSON) | Prototype:
'contexts' ?: ( <ident>* )
'localize_datatypes' ?: <bool>
'fetch_extra' ?: ( 'sap_description' | 'sap_refs' | 'db_stats'* )
|
| Response headers | None |
| Response body (JSON) | Prototype:
'schema' ?: <str>
'schema_type' ?: 'configured' | 'discovered'
'base_name' : <str>
'capture' : <bool>
'integrate' : <bool>
'key_mode' : 'explicit' | 'implicit' | 'duplicate_rows'
'available_contexts' ?: ( <ident>+ )
'source_tables' ?: ( table<ident>+ )
'source_for_tables' ?: ( table<ident>+ )
'exists_in_db' : <bool>
'diff' : (
'distrib_key_removed'
| 'distrib_key_added'
| 'unique_index_removed'
| 'unique_index_added'
| 'source_tables'*
)
'sap_unpack' ?: {
'inside_table_base_name' : <str>
'inside_table_exists' ?: <bool>
}
'sap_description' ?: <str>
'sap_refs_to' ?: (
{
'base_name' : <str>
}*
)
'db_stats' ?: {
'num_rows' ?: <int64_ascii>
}
'cols' ?: (
{
'hvrcolname' ?: <str>
'basecolname' ?: <str>
'core' ?: {
'sequence' : <int>
'key' ?: <int>
'distrib_key' ?: <int>
'data_type' : <str>
'attributes' ?: {
'encoding' ?: <str>
'nullable' ?: <bool>
'charlen' ?: <int64_ascii>
'bytelen' ?: <int64_ascii>
'prec' ?: <int>
'scale' ?: <int>
'timeprec' ?: <int>
'dayprec' ?: <int>
'yearprec' ?: <int>
'bitlen' ?: <int>
}
}
'with_col_props' ?: {
'sequence' : <int>
'key' ?: <int>
'distrib_key' ?: <int>
'data_type' : <str>
'attributes' ?: {
'encoding' ?: <str>
'nullable' ?: <bool>
'charlen' ?: <int64_ascii>
'bytelen' ?: <int64_ascii>
'prec' ?: <int>
'scale' ?: <int>
'timeprec' ?: <int>
'dayprec' ?: <int>
'yearprec' ?: <int>
'bitlen' ?: <int>
}
'localize_type_change' : <bool>
'sql_data_type' ?: <str>
'other_props' : {
'BaseName' ?: <str>
'SoftDelete' ?: <true>
'Extra' ?: <true>
'CaptureExpression' ?: <str>
'IntegrateExpression' ?: <str>
'TimeKey' ?: <true>
'CaptureFromRowId' ?: <true>
'DistributionKey' ?: <true>
'SurrogateKey' ?: <true>
}
}
'from_db' ?: {
'sequence' : <int>
'key' ?: <int>
'distrib_key' ?: <int>
'data_type' : <str>
'attributes' ?: {
'encoding' ?: <str>
'nullable' ?: <bool>
'charlen' ?: <int64_ascii>
'bytelen' ?: <int64_ascii>
'prec' ?: <int>
'scale' ?: <int>
'timeprec' ?: <int>
'dayprec' ?: <int>
'yearprec' ?: <int>
'bitlen' ?: <int>
}
'sql_data_type' ?: <str>
'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' ?: <int64_ascii>
}
}*
)
|
| Status codes | ✅ 200 OK ❌ 400 Bad Request |
| Required permissions | ReadOnly access level on hub |
| Events | Creates no events. |
POST/api/v6.1.0.26/hubs/{hub}/channels/{channel}/locs/{loc}/adapt/other_channels
| Query parameters | None |
| Request headers | None |
| Request body (JSON) | Prototype:
'tables' ?: (
{
'schema' ?: <str>
'base_name' : <str>
}*
)
|
| Response headers | None |
| Response body (JSON) | Prototype:
{
'schema' : <str>
'base_name' : <str>
'other_channels' : ( chn<ident>+ )
}*
|
| 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.26/hubs/{hub}/mapdoc/parse
| Query parameters | None |
| Request headers | None |
| Request body (JSON) | Prototype:
|
| Response headers | None |
| Response body (JSON) | Prototype:
'tables' : (
{
'schema' ?: <str>
'pattern' : <str>
'not_pattern' ?: <str> | ( <str>+ )
}
| {
'schema' ?: <str>
'base_name' : <str>
}*
)
|
| Status codes | ✅ 200 OK ❌ 400 Bad Request |
| Required permissions | ReadOnly access level on hub |
| Events | Creates no events. |