Reputation: 99
I have a query which has close to 2000000 records in the table . I want to export all these records from Table to a CSV file . But the CSV file is allowing me only a max of 200000 files at a time . My ultimate goal is to take all these records and form a dataframe in R for further analysis.
Upvotes: 1
Views: 3833
Reputation: 22467
SQL Developer has no limit on the size of the CSV we export.
Here's an example of a table to CSV to 2,500,000 records.
CREATE TABLE so_2m (
x INT,
y DATE
);
BEGIN
FOR i IN 1..2500000 LOOP
INSERT INTO so_2m VALUES (
i,
SYSDATE
);
END LOOP;
END;
/
commit;
select count(*) from so_2m;
Table SO_2M created.
PL/SQL procedure successfully completed.
Commit complete.
COUNT(*)
----------
2500000
And now let's query and export to CSV
And now let's watch the export and then do a count of lines in the file.
My CSV has 2,500,001 lines. The first line is the Header list of column names.
My 2018 Mac Mini with Oracle VirtualBox running Database 18c EE and SQL Developer version 18.4 generated this file in about 2 minutes.
Upvotes: 1