ora2pg icon indicating copy to clipboard operation
ora2pg copied to clipboard

How to Export data into Multiple Files for Tables having Sizes in Gigs ?

Open jagmohankaintura-tl opened this issue 4 years ago • 1 comments

I have few tables which have data in millions and size is over 1GB . I wanted to extract table data into multiple files. I could see there is a method to extract the data using where clause for specific tables. Using this not sure whether it will generate multiple files or not if we place multiple where clauses in ranges.

Is there a way to divide the data files into multiple files for a table in Ora2pg at runtime only. Like limiting the number of records in a file and then start writing in another file.

Please share the information if we have such implementation already in place in ora2pg.

Example : Table customer_data Size 4-GB - 100 million records.
Can this data be extracted in multiple files as : customer_data_1_data.sql : 10 million rows customer_data_2_data.sql : 10 million rows customer_data_3_data.sql : 10 million rows customer_data_4_data.sql : 10 million rows customer_data_5_data.sql : 10 million rows customer_data_6_data.sql : 10 million rows customer_data_7_data.sql : 10 million rows customer_data_8_data.sql : 10 million rows customer_data_9_data.sql : 10 million rows customer_data_10_data.sql : 10 million rows

jagmohankaintura-tl avatar Sep 23 '20 02:09 jagmohankaintura-tl

Unfortunately there is no such option but it can be done, add it to my todo list. For the moment you must do that manually using the split command and fixing the end and start of the file to fix the broken COPY statements.

darold avatar Sep 28 '20 09:09 darold