Target Audience: Admin/Developers/Infoworks-End User


How to handle the issue arising during running CDC job when Table fails merging the records"


User will get to see the below error message in Infoworks UI when he is running the CDC jobs.


"Info:Error: infoworks.tools.ExceptionHandling.IWException: java.lang.ClassCastException: org.apache.hadoop.io.Text cannot be cast to org.apache.hadoop.io.BytesWritable"


Steps to handle this is provided below


1. Login to Infoworks Edge node machines and Please download the attached script (update_table_cols.py) in home path and change the       permission to the respective file.

    chmod 777 update_table_cols.py


2. Copy the download file from /home/username/ to  $IW_HOME path
    cp /home/username/update_table_cols.py $IW_HOME/.


3. source $IW_HOME/bin/env.sh 


4. Run attached script to update mongo db.
    python update_table_cols.py {source_id}


5. Alter main table and history table to change column type of column to string using command 

    ALTER TABLE cdc_fnd_user CHANGE user_guid user_guid string;

    ALTER TABLE history_cdc_fnd_user CHANGE user_guid user_guid string;


6. Drop cdc table  DROP TABLE cdc_cdc_fnd_user4;


7. Turn off schema synchronisation option for the respective job in Infoworks UI


8. Run cdc and merge job again


After these steps the job will not fail.


Thanks,

Sri