Creates a compareset, which includes the database connection profile, and the source and target tables to be compared.
create compareset compareset_name
[set desc [{to|=}] description]
with source source_connection_name owner_name
source_table_name source_alias [where “constraint”]
target target_connection_name owner_name
target_table_name target_alias [where “constraint”]
[and target target_connection_name owner_name
target_table_name target_alias [where “constraint”]...]
map {all [set strict_column=true | false]
[set strict_type=true | false]
[set keep_computed=true | false]
[set keep_encrypted=true | false]|
source_table_alias.column_name = target_table_alias.column_name
[ = target_table_alias.column_name ...]
[set key=true ],
[and source_table_alias.column_name =
target_table_alias.column_name [ =
target_table_alias.column_name ...]
[set key=true]…] }
create compareset cust_orders with source conn_prod cust_owner cust_orders t1 where “id>100” target conn_bak1 cust_owner cust_orders t2 where “id>100” and target conn_bak2 cust_owner cust_orders t3 where “id>100” map t1.id = t2.id = t3.id set key=true and t1.cust_id = t2.cust_id = t3.cust_id and t1.sku = t2.sku = t3.sku and t1.date= t2.date = t3.date go
Compareset “cust_orders” was created successfully
create compareset cust_orders with source conn_prod cust_owner cust_orders t1 where “id>100” target conn_bak1 cust_owner cust_orders t2 where “id>100” and target conn_bak2 cust_owner cust_orders t3 where “id>100” map all go
Compareset “cust_orders” was created successfully
All targets must have same number of map columns.
At least one key column is required. Multiple key columns are allowed.