This is an automated email from the ASF dual-hosted git repository.

bamaer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/main by this push:
     new be7a05d209 Batch 9: Result sections for the bulk load actions: Bulk 
load into MySQL, Bulk load from MySQL into file, Bulk load into MSSQL. #8970 
(#9143)
be7a05d209 is described below

commit be7a05d209ce87fca8c05dfba984d84884ce1b79
Author: Adalennis <[email protected]>
AuthorDate: Fri Oct 30 10:35:49 2026 +0100

    Batch 9: Result sections for the bulk load actions: Bulk load into MySQL, 
Bulk load from MySQL into file, Bulk load into MSSQL. #8970 (#9143)
---
 .../ROOT/pages/workflow/actions/mssqlbulkload.adoc | 33 +++++++++++++++++---
 .../ROOT/pages/workflow/actions/mysqlbulkfile.adoc | 36 +++++++++++++++++-----
 .../ROOT/pages/workflow/actions/mysqlbulkload.adoc | 23 +++++++++++---
 3 files changed, 76 insertions(+), 16 deletions(-)

diff --git 
a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/mssqlbulkload.adoc 
b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/mssqlbulkload.adoc
index 1029ed3b40..ebfb2d0de3 100644
--- 
a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/mssqlbulkload.adoc
+++ 
b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/mssqlbulkload.adoc
@@ -39,11 +39,11 @@ Contrary to the transform bulk loaders, this action 
requires a pre-existing file
 |Target schema|The target schema.
 |Target table name|The target table.
 |Truncate table|Whether or not to truncate the table before starting the bulk 
load.
-2+|Data file
+2+|Data File
 |Source File name|The file to bulk load into MSSQL.
 |Data file type|char, native, widechar, widenative
 |Fields terminated by|The field separation character.
-|Rows terminated by|The row termination character.
+|Row terminated by|The row termination character.
 |===
 
 === Advanced tab
@@ -51,8 +51,8 @@ Contrary to the transform bulk loaders, this action requires 
a pre-existing file
 [options="header", width="90%", cols="1,3"]
 |===
 |Option|Description
-|Codepage|OEM, ACP, RAW, specific
-|Specific codepage|Code page to use when specific is selected.
+|Codepage|ACP, OEM (default), RAW or Specific. See the NOTE under <<Result>>.
+|Specific codepage|Code page to use when Specific is selected.
 |Format file|Path to format file.
 |Browse|Browse the filesystem to choose a format file.
 |Fire triggers|
@@ -70,4 +70,27 @@ Contrary to the transform bulk loaders, this action requires 
a pre-existing file
 |Batch size|
 |Rows per batch|
 |Add file to result filenames|
-|===
\ No newline at end of file
+|===
+
+== Result
+
+What this action passes on to the next action. See 
xref:workflow/action-results.adoc[Action results] for how results travel 
through a workflow.
+
+[options="header", width="90%", cols="1,3"]
+|===
+|Result|Value
+|True|The file was loaded, with 0 errors.
+|False|The file doesn't exist, the table doesn't exist, *Source File name* is 
empty, the connection is unknown or can't be opened, or SQL Server refuses the 
load (for example a value that doesn't fit its column). The number of errors is 
1.
+
+The action is also false, but with 0 errors, when the connection is not a 
Microsoft SQL Server connection, when *Fields terminated by* is empty while 
*Data file type* is char or widechar, and when *Error file* exists while *Add 
date time* is unchecked. The reason is logged as an error.
+|Result files|The source file is added when *Add file to result filenames* is 
checked and the load succeeded. Otherwise passed on unchanged.
+|Result rows|Passed on unchanged.
+|===
+
+NOTE: SQL Server reads the file, so *Source File name* must be a path that the 
database server can read. The action also checks that the file exists on the 
machine where Hop runs, before it loads.
+
+NOTE: When the load fails on a row, the rows before it can stay in the table: 
with the default options, a value that doesn't fit its column on row 2 left row 
1 loaded.
+
+NOTE: SQL Server on Linux only accepts the RAW *Codepage*: the default, OEM, 
makes the load fail there. In this version, *Specific* sends the word 
`Specific` to SQL Server instead of the value of *Specific codepage*, so the 
load fails.
+
+NOTE: When both *Start at line* and *End at line* are set, only *End at line* 
is used: the load starts at the first line.
diff --git 
a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/mysqlbulkfile.adoc 
b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/mysqlbulkfile.adoc
index 95afafd27e..c8a0568202 100644
--- 
a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/mysqlbulkfile.adoc
+++ 
b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/mysqlbulkfile.adoc
@@ -31,10 +31,11 @@ The `Bulk load from MySQL into file` action bulk loads data 
from a MySQL table i
 |Option|Description
 |Action name|The name of the workflow action.
 |Connection|The database connection.
-|Target schema|The target schema.
-|Target File name|The target file.
-|High Priority|The priority to load the file with.
-|Type|OUTFILE, DUMPFILE
+|Source schema|The schema of the table to export.
+|Source table|The table to export.
+|Target File name|The file to write, on the database server.
+|High Priority|Adds `HIGH_PRIORITY` to the query. Checked by default: see the 
NOTE under <<Result>>.
+|Type|OUTFILE (default) writes the rows with the separators below. DUMPFILE 
writes a single row without any formatting: more than one row makes the action 
fail.
 |Field separator|The field separator to use.
 |Fields enclosed by|The field enclosure to use.
 |Optionally enclosed|
@@ -43,8 +44,29 @@ The `Bulk load from MySQL into file` action bulk loads data 
from a MySQL table i
 |Limit to the...first lines|Only export the first x number of rows
 |If file exists a|The action to take when the target file already exists:
 
-* Create new with unique name
-* Do Nothing
-* Fail (default)
+* Create new with unique name: the file gets the date and time added to its 
name
+* Do Nothing: nothing is exported, and the action is true
+* Fail (default): the action is false, with 1 error
 |Add file to result filenames|Add the target file to the result filenames
 |===
+
+== Result
+
+What this action passes on to the next action. See 
xref:workflow/action-results.adoc[Action results] for how results travel 
through a workflow.
+
+[options="header", width="90%", cols="1,3"]
+|===
+|Result|Value
+|True|The file was written, with 0 errors. Also true when the file already 
exists and *If file exists* is *Do Nothing*: then nothing is exported, and the 
action doesn't connect to the database.
+|False|The file exists and *If file exists* is *Fail*, the table doesn't 
exist, *Target File name* is empty, the connection can't be opened, or MySQL 
refuses the query (for example a path outside the folder allowed by the 
server's `secure_file_priv` setting, or *DUMPFILE* on more than one row). The 
number of errors is 1.
+|Result files|The target file is added when *Add file to result filenames* is 
checked and the file was written. Otherwise passed on unchanged.
+|Result rows|Passed on unchanged.
+|===
+
+NOTE: *High Priority* is checked by default, and on MySQL 8.4 it makes the 
action fail with "Table ... appears in multiple locking clauses": the action 
always adds `LOCK IN SHARE MODE` to the query, and MySQL doesn't accept both. 
Uncheck *High Priority* to export.
+
+NOTE: A *Connection* that doesn't exist in the project is not a false result: 
the workflow stops with an error and no hop from the action is followed.
+
+NOTE: When the table doesn't exist, the reason is only logged at the Detailed 
log level: at the Basic level, the log shows a false action without an error 
message.
+
+NOTE: The MySQL server writes the file (`SELECT ... INTO OUTFILE`), so *Target 
File name* is a path on the database server. *If file exists* is checked on the 
machine where Hop runs.
diff --git 
a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/mysqlbulkload.adoc 
b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/mysqlbulkload.adoc
index a2d4542d99..4f59312c40 100644
--- 
a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/mysqlbulkload.adoc
+++ 
b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/mysqlbulkload.adoc
@@ -36,7 +36,7 @@ This action uses the MySQL 
https://dev.mysql.com/doc/refman/8.0/en/load-data.htm
 |Target schema|The schema of the table to load.
 |Target table name|The name of the table to load into.
 |Source file name|The name of the file to load.
-|Local|Check this if the file is local.
+|Local|Checked (default): Hop reads the file and sends it to MySQL (`LOAD DATA 
LOCAL`). The connection needs the option `allowLoadLocalInfile=true`, and the 
server needs `local_infile` enabled: without them the load fails. Unchecked: 
the MySQL server reads the file, so the path must exist on the database server.
 |Priority a|The priority to load the file with. The available options are:
 
 * NORMAL (default): no priority is set on the `LOAD DATA` command
@@ -48,7 +48,22 @@ This action uses the MySQL 
https://dev.mysql.com/doc/refman/8.0/en/load-data.htm
 |Lines started by|The line start string to use.
 |Lines terminated by|The line termination string to use.
 |Fields|The fields to load, separated by comma (,).
-|Replace data|Check this option if you want to replace the data in the target 
data.
-|Ignore the first ... lines|Ignores the first ... lines in the text file.
-|Add files to result|Check this option if you want to re-use the filename of 
the text file in a next workflow action.
+|Replace data|Checked (default): a row whose key already exists in the table 
replaces the existing row. Unchecked: the existing row is kept, and the row 
from the file is skipped.
+|Ignore the...first lines|Ignores this number of lines at the start of the 
file, for example a header line.
+|Add file to result filenames|Adds the source file to the result files, for 
use in a next workflow action.
 |===
+
+== Result
+
+What this action passes on to the next action. See 
xref:workflow/action-results.adoc[Action results] for how results travel 
through a workflow.
+
+[options="header", width="90%", cols="1,3"]
+|===
+|Result|Value
+|True|The file was loaded, with 0 errors.
+|False|The file doesn't exist, the table doesn't exist, *Source File name* is 
empty, the connection is unknown or can't be opened, or MySQL refuses the load. 
The number of errors is 1.
+|Result files|The source file is added when *Add file to result filenames* is 
checked and the load succeeded. Otherwise passed on unchanged.
+|Result rows|Passed on unchanged.
+|===
+
+NOTE: When the table doesn't exist, the reason is only logged at the Detailed 
log level: at the Basic level, the log shows a false action without an error 
message.

Reply via email to