diff --git a/arc-core/src/main/java/fr/insee/arc/core/service/p6export/parquet/ParquetDao.java b/arc-core/src/main/java/fr/insee/arc/core/service/p6export/parquet/ParquetDao.java index 4e3f1e30..a2cf1511 100644 --- a/arc-core/src/main/java/fr/insee/arc/core/service/p6export/parquet/ParquetDao.java +++ b/arc-core/src/main/java/fr/insee/arc/core/service/p6export/parquet/ParquetDao.java @@ -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; @@ -83,8 +84,11 @@ public void exportToParquet(List 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); @@ -279,7 +283,6 @@ private void attachPostgresDatabasesToDuckdb(Connection connection) + query.quoteText(encryptionKey.getValue()) + ");"); } } - executeQuery(connection, query); }