Transformation not applied

Help
Arash
2014-07-10
2014-07-16
  • Arash
    Arash
    2014-07-10

    Hello everybody I am trying to sync from mysql to sql server with some data transformation in the middle, the syncing works fine but the transformation is not applied and there is no error message in the log, can you spot the problem here?

    source database: mysql
    database name: parslogic_ivr
    table: synctest2 (id, calldate, strcol)

    destination database: sql server
    database name: synctt
    table: synctest2 (id, calldate, strcol)

    this is my configuration insert sql:

    insert into sym_node_group (node_group_id, description)
    values ('crm', 'CRM Server');
    insert into sym_node_group (node_group_id, description)
    values ('tel', 'Telephony Server');

    insert into sym_node_group_link (source_node_group_id, target_node_group_id, data_event_action)
    values ('tel', 'crm', 'W');

    insert into sym_node_group_link (source_node_group_id, target_node_group_id, data_event_action)
    values ('crm', 'tel', 'W');

    insert into sym_node (node_id, node_group_id, external_id, sync_enabled)
    values ('000', 'crm', '000', 1);
    insert into sym_node_security (node_id,node_password,registration_enabled,registration_time,initial_load_enabled,initial_load_time,initial_load_id,initial_load_create_by,rev_initial_load_enabled,rev_initial_load_time,rev_initial_load_id,rev_initial_load_create_by,created_at_node_id)
    values ('000','changeme',0,current_timestamp,0,current_timestamp,null,null,0,null,null,null,'000');
    insert into sym_node_identity values ('000');

    insert into sym_channel
    (channel_id, processing_order, max_batch_size, enabled, description)
    values('telchannel', 1, 100000, 1, 'sale_transactional data from register and back office');

    insert into sym_trigger
    (trigger_id,source_catalog_name,source_table_name,channel_id,last_update_time,create_time)
    values('synctest2', 'parslogic_ivr','synctest2','telchannel',current_timestamp,current_timestamp);

    insert into sym_router
    (router_id,source_node_group_id,target_node_group_id, TARGET_CATALOG_NAME, TARGET_SCHEMA_NAME, router_type,create_time,last_update_time)
    values('synctest2', 'tel', 'crm', 'synctt', 'dbo', 'default', current_timestamp, current_timestamp);

    insert into sym_trigger_router
    (trigger_id,router_id,initial_load_order,last_update_time,create_time)
    values('synctest2','synctest2', 100, current_timestamp, current_timestamp);

    insert into SYM_TRANSFORM_TABLE(transform_id, source_node_group_id, target_node_group_id,
    transform_point, source_table_name, target_table_name,
    delete_action, column_policy,last_update_time,create_time) values
    ('synctest2', 'tel', 'crm',
    'EXTRACT', 'synctest2', 'synctest2',
    'DEL_ROW', 'SPECIFIED', current_timestamp, current_timestamp);

    insert into sym_transform_column (transform_id, source_column_name, target_column_name, pk, transform_type, transform_expression,last_update_time,create_time)
    values
    ('synctest2', 'id', 'id', 1, 'copy', null, current_timestamp, current_timestamp),
    ('synctest2', 'calldate', 'calldate', 0, 'copy', null, current_timestamp, current_timestamp),
    ('synctest2', 'strcol', 'strcol', 0, 'bsh', 'return "${currentValue} mypostfix"', current_timestamp, current_timestamp);

     
  • Eric Long
    Eric Long
    2014-07-16

    If you use a different catalog or schema than the default, the transform needs you to tell it which one to match on. In your router, you are overriding the catalog and schema to 'synctt' and 'dbo'. So, try putting source_catalog_name of 'synctt' and source_schema_name of 'dbo' in your sym_transform_table.