diff --git a/docs/hop-user-manual/modules/ROOT/pages/pipeline/transforms/snowflakebulkloader.adoc b/docs/hop-user-manual/modules/ROOT/pages/pipeline/transforms/snowflakebulkloader.adoc index 1c4bf4c49e2..879d4afbdb8 100644 --- a/docs/hop-user-manual/modules/ROOT/pages/pipeline/transforms/snowflakebulkloader.adoc +++ b/docs/hop-user-manual/modules/ROOT/pages/pipeline/transforms/snowflakebulkloader.adoc @@ -58,7 +58,7 @@ The Snowflake Bulk Loader transform utilizes the Snowflake Copy command to load - **On Error**: (Abort, Skip File, Skip File Percent, Continue) The behavior when errors are encountered on a load. - **Error limit**: (When On Error = Skip File or Skip File Percent) The error limit before the file should be skipped. If empty or 0 the file will be skipped on the first error. - **Split load every ... rows**: Breaking the temp files into multiple smaller files will allow Snowflake to perform the bulk load in parallel, thus improving performance. This is the number of rows each file should contain. -- **Remove files after load**: (Y/N) Should the files be removed from the Snowflake stage after the load. (Local temp files are always removed.) +- **Remove files after load**: (Y/N) Should the files be removed from the Snowflake stage after the load? You also need to set variable `SNOWFLAKE_DEBUG_MODE` to `true` to keep the files. === Data type tab diff --git a/plugins/transforms/snowflake/src/main/java/org/apache/hop/pipeline/transforms/snowflake/bulkloader/SnowflakeBulkLoader.java b/plugins/transforms/snowflake/src/main/java/org/apache/hop/pipeline/transforms/snowflake/bulkloader/SnowflakeBulkLoader.java index e1b37d97c46..7b5b521bfec 100644 --- a/plugins/transforms/snowflake/src/main/java/org/apache/hop/pipeline/transforms/snowflake/bulkloader/SnowflakeBulkLoader.java +++ b/plugins/transforms/snowflake/src/main/java/org/apache/hop/pipeline/transforms/snowflake/bulkloader/SnowflakeBulkLoader.java @@ -775,7 +775,7 @@ public void dispose() { setErrors(1); } - if (!Boolean.parseBoolean(resolve(SnowflakeBulkLoaderMeta.DEBUG_MODE_VAR))) { + if (meta.isRemoveFiles() || !Boolean.parseBoolean(resolve(SnowflakeBulkLoaderMeta.DEBUG_MODE_VAR))) { for (String filename : data.previouslyOpenedFiles) { try { HopVfs.getFileObject(filename).delete();