Working on a small example where have to copy millions of records from teradata database to Oracle DB.
Environment: Spring Boot + Spring JDBC (jdbcTemplate) + Spring REST + Spring Scheduler + Maven + Oracle + Teradata
Using Spring JDBC's batchUpdate to insert data into target Database Oracle.
Using teradata's 'top 1000' in SQL query from source database.
fecthDataResults = repository.queryForList(
"select top 1000 A, B, C, D, E from " + schemaName + ".V_X");
Querying from a View "V_X".
This View has 40 million records and spring boot application will choke if it runs.
Also inserting into 2 tables (Primary and Backup) in target Oracle DB.
Whats the best way to fetch and load/copy 40 million records making sure that copying was done successfully into 2 tables.
Spring Scheduler to schedule the batch copy at specified time/interval. Spring Rest to invoke copying manually - both of which is achieved.
Any suggestions would be appreciated.
Thanks.