I need to split a huge table in to chunks.
Fetching data from DB2 and processing in SSIS
iteration 1 : Get first 10 rows and process it
iteration 2 : Get next 10 rows(11-20) and process it
iteration 3 : Get next 10 rows(21-30) and process it
and so on till count(*) of a table
Is it possible to get top n to n rows from db2
im looking for a query like below,
select * from from tablename fetch 10 to 20 rows
https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.1.0/com.ibm.db2.luw.sql.ref.doc/doc/r0061832.html
Use OFFSET x FETCH FIRST y ROWS ONLY option to read data by chunk
To benefit from this method in SSIS, you should follow these steps:
In OLEDB/ODBC Source, Set the Access mode to SQL Command and define an epxression similar to:
The following answer is a step by step guide to load data by chunks from SQLite, you can follow it just change the SQL Command syntax as mentioned:
References