Skip to content

Commit

Permalink
fix: oom parquet export
Browse files Browse the repository at this point in the history
  • Loading branch information
Nolife999 committed Nov 1, 2024
1 parent 5f74063 commit 8a64630
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import java.util.Properties;

import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;
Expand Down Expand Up @@ -83,8 +84,11 @@ public void exportToParquet(List<TableToRetrieve> tables, String outputDirectory

// load duckdb extension
loadDuckdb();

try (Connection connection = DriverManager.getConnection("jdbc:duckdb:")) {

Properties connectionProperties = new Properties();
connectionProperties.setProperty("preserve_insertion_order", "false");

try (Connection connection = DriverManager.getConnection("jdbc:duckdb:",connectionProperties)) {

// unzip extensions
unzipExtensions(connection);
Expand Down Expand Up @@ -279,7 +283,6 @@ private void attachPostgresDatabasesToDuckdb(Connection connection)
+ query.quoteText(encryptionKey.getValue()) + ");");
}
}

executeQuery(connection, query);
}

Expand Down

0 comments on commit 8a64630

Please sign in to comment.