# Execute row SQL script

## ![](/files/Pde1c05lFaNFlzuWT5Jv) Execute row SQL script

### Description <a href="#description" id="description"></a>

The Execute Row SQL Script transform executes an SQL script for every input row the transform receives.

The SQL to execute can be passed as pipeline fields or read from a file.

| Hop Engine | <sup>✓</sup> |
| ---------- | ------------ |
| Spark      | ?            |
| Flink      | ?            |
| Dataflow   | ?            |

### Options

| Option                        | Description                                                                                                                                                                              |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Transform name                | Name of the transform; This name has to be unique in a single pipeline                                                                                                                   |
| Connection                    | Select a database connection to use                                                                                                                                                      |
| Commit                        | Number of rows to send before doing a database commit                                                                                                                                    |
| SQL field name                | The field that either contains the SQL to execute or optionally specifies the path to a file that contains SQL to execute                                                                |
| Read SQL from file            | If checked, then the SQL field name option specifies a file that contains SQL to execute, otherwise the SQL field name option specifies the actual SQL to execute. (Available since 5.0) |
| Field to contain insert stats | Optional: If you want to get an additional field in our stream with the number or records that where inserted, please define the field name here.                                        |
| Field to contain update stats | Same as insert stats, but for updated rows.                                                                                                                                              |
| Field to contain delete stats | Same as insert stats, but for deleted rows.                                                                                                                                              |
| Field to contain read stats   | Same as insert stats, but for read rows.                                                                                                                                                 |

### Notes

Because of the scripting/dynamic nature of the transform, it does not use prepared statements and thus is not intended to work fast or optimal. For good performance turn to dedicated transforms like Table Output (insert into), Table Input (Select), Update, Delete, etc.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/pipelines/transforms/execsqlrow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
