Getting huge volume data from data to AllSync

Allsync supports direct connector to database like MS-SQL, Oracle, MySQL, SAP Hana.

The connector will connect directly to database and execute the query from configuration to get the data, each record received will be a incoming queue to AllSync.

However there will be a challenge to manage the latest update data and first time to get all data.

1. Manage to get latest updated date by period

select * from table T0 with(nolock)

where (cast(T0.Updated_Date as date)- date '1970-01-01')* 60 * 60 * 24  - 7*60*60 >= {{lastRun}}

connector will store the last run time to database and fill to the query for next run

2. Manage to get huge data by paging

select * from Table T0

join 

(

select table_id from Table 

order by table_id
OFFSET (<{i}>)*200 ROWS FETCH next 200 ROWS ONLY

) T1 on T0.table_id=T1.table_id

 

connector will loop each page to variable <{i}> to get each page data.

Back to blog