Adalennis opened a new issue, #9036:
URL: https://github.com/apache/hop/issues/9036
### Apache Hop version?
2.20.0-SNAPSHOT
### Java version?
Java 21
### Operating system
macOS
### What happened?
On a SQL Server connection (MS SQL Server Native), every pipeline run
executes the Table Input
SQL twice: once to read the result set metadata, and once to read the rows.
Statements with
side effects in the same batch (INSERT, UPDATE, DROP, SELECT INTO, EXEC of a
procedure)
therefore run twice: inserted rows are duplicated and procedures run twice.
Steps to reproduce: a table `CREATE TABLE dbo.TI_RUN_LOG (pipeline
VARCHAR(50), run_at DATETIME2
DEFAULT SYSDATETIME())`, and a pipeline Table Input → Dummy with this SQL:
INSERT INTO dbo.TI_RUN_LOG (pipeline) VALUES ('ti1');
SELECT COUNT(*) AS runs FROM dbo.TI_RUN_LOG WHERE pipeline = 'ti1';
Run it once with hop-run. The table then has 2 rows, and the Table Input
returns `runs = 2`.
It is the same with Select Values, Text File Output or Memory Group By after
the Table Input.
The two executions are sequential, not overlapping.
### Issue Priority
Priority: 3
### Issue Component
Component: Hop Gui
--
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]