# Step 2: Loading changes from the source database table into the Hive external table

This step reads only the changes from the source database table and loads them into the Hive external table employee\_extnl.

## Procedure

1. The Big Data Batch Job is as follow:

   ![](https://help.qlik.com/talend/en-US/components/7.2/Resources/images/talend_big_data_batch_Job2.png)
   * The source table is filtered by the last updated timestamp which is maintained in the cdc\_control table. This is done by using this SQL in the Where condition of the tmysqlInput component.

     where cdc.Table\_Name='employee\_table' and emp.`Record_DateTime`&gt; cdc.Last\_executed"
   * The tAggregateRow loads one row per run into the cdc\_control table. It does an update else insert operation on the table. If a record for the table already exists, it will update the record with the run time of the Job.

     The runtime can be set by using the TalendDate.getCurrentDate() function.

   ![](https://help.qlik.com/talend/en-US/components/7.2/Resources/images/cdc_control_config.png)

   The following shows the data in the source **employee\_table** table after new records are added: ![](https://help.qlik.com/talend/en-US/components/7.2/Resources/images/employeetable2.png)
2. Run the Job.

   The following shows the data in the employee\_extnl external Hive table after the Job is run: ![](https://help.qlik.com/talend/en-US/components/7.2/Resources/images/results_data_employeetable.png)