About: This article introduces the SQL Command for Each node, a Process node within Construct.
Location: Node panel
Table of Contents
Feature Overview
The SQL Command for Each node permits users to incorporate and execute custom SQL scripts within a job workflow. It’s intended to connect into a job and interact directly with the records passing into it. To support this interaction and to provision for the widest range of scripting possibilities, the setup window has multiple fields into which SQL scripts can be entered.
- A script placed in the Command before reading input field runs before the first record is acted upon by proceeding scripts.
- Command for each input row will contain script that will act on the records passing into the node one at a time. The Columns section to the left displays the variables entering the node, allowing them to be selected and integrated into the SQL script.
Note: Nothing that this node can do will affect the records passing through it – in other words, the records will emerge from this node the same way that they entered it.
- The Command after success field permits users to execute a SQL script once the Command before reading input and Command for each input row have completed running without reporting an error.
- The Command after failure field will execute its SQL script after either the Command before reading input or Command for each input row failed to run due to an error.
By default, the SQL Each node is not available to use unless the Allow SQL Commands on Database connections options is selected. This option can be found by going to Tools > Options in the main menu. Once the option is selected and saved, any database connection capable of executing SQL script commands will have this node available once it is selected in the Connections window.
This node accepts data from and can pass data to other nodes. The SQL operations that its script specifies are performed using the data flowing into the node, one record at a time. Records flowing into the node will emerge unaffected by their passage.
Video Tutorial
Comments
0 comments
Article is closed for comments.