Adalennis opened a new pull request, #9139: URL: https://github.com/apache/hop/pull/9139
Addresses #8970 Eighth batch: a Result section on the pages of the database actions: Check DB connections, Columns exist in a table, Evaluate rows numbers in a table, SQL, Table exists, Truncate tables and Wait for SQL. Every row comes from a hop-run test against the current code (93 workflows, PostgreSQL 16 in Docker, tables recreated before each test). Each action was also run after an action that is true with 2 errors (all seven pass on 0 errors), and each early return was run with a previous result holding files, rows and metrics. What the tests show: - Custom SQL in Evaluate rows numbers and Wait for SQL counts the rows the query returns, not a value in them: `SELECT count(*) FROM t` always counts 1, also on an empty table. Documented as a NOTE on both pages. - Evaluate rows numbers adds the custom SQL rows to the result also when the condition is not met; Wait for SQL only when it is met. In both, Clear list of result rows removes the previous rows also when Add rows to result is off. - Truncate tables stops at the first table that fails, and the tables after it are not truncated. Lines deleted is the number of tables, not rows. With Previous results to args and no previous rows, nothing is truncated, not even the tables in the grid. - Columns exist sets Lines written only once it checks the table: with an empty or unknown connection, an empty table name or no columns, the previous action's value is passed on. - Table exists: a missing table is false with 0 errors. Empty or unreachable connection: 1 error. - SQL: without Send SQL as single statement, the statements before a failing one stay done and the ones after it are not run. With it, on PostgreSQL nothing is kept. - Wait for SQL: a failing query (missing table) counts as condition not met, so the action keeps checking until the timeout. - Check DB connections checks every connection; the number of errors is the number that failed. Also fixed: - Check DB connections: the Wait and Units of time rows were commented out; they are back with the dialog labels. - Labels: SQL (Connection, Send SQL as single statement, Use variable substitution, SQL Script), Truncate tables (Previous results to args), Evaluate rows numbers (Clear list of result rows before execution, Greater or equal to), Wait for SQL (Target table). Truncate tables: a typo. Found while testing (not reported yet): - Table exists with a connection name that doesn't exist in the project gives false with 0 errors and logs nothing, the same as a missing table. Documented as a NOTE. - Wait for SQL logs a connection failure at Basic level instead of as an error. - Truncate tables logs a result row with an empty table name as an error, but doesn't count it. ------------------------ Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Run `mvn clean install apache-rat:check` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [x] If you have a group of commits related to the same change, please squash your commits into one and force push your branch using `git rebase -i`. - [x] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) you have to acknowledge this by using the following check-box. - [x] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
