--- title: "execute sqlnode in phase3()" slug: "basic-execute-sql-node" updated: 2026-08-11T11:59:45Z published: 2026-08-11T11:59:45Z canonical: "docs.lobstersoftware.com/basic-execute-sql-node" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # execute sqlnode in phase3() This function executes an SQL node in Phase 3 instead of Phase 4. There are several use cases for this. - **Last, separate field in the SQL node:** The function executes each record individually (each iteration). - **Field after the SQL node:** The function executes the entire node (all iterations at once). - **Stored procedure call in the last, separate field:** The function commits the stored procedure immediately. It writes the result set into a map. The map name matches the name of the SQL node. - The function saves the result set in the map named `map_result_<name of SQL node>`. **NOTE:** The database sometimes needs the data already during Mapping. In this case, use the function `commit sqlnode in phase3()`. **NOTE:** The function only considers fields located directly in the specified SQL node when executing. It ignores fields in child nodes. ## Parameters | Parameter | Description | | --- | --- | | `a` | Name of the SQL node. | | `b` | (optional) Comma-separated list of indices. The indices define positions in the result set of the called stored procedure. These positions provide the output parameters. The index starts at `1`. The function stores the output parameters in the map named `map_out_<name of SQL node>`. | Mapping: Rules transfer the data from the source structure to the target structure. This is the core of the profile. An optional phase in a profile between mapping and the integration unit. In Phase 4, the profile writes target structure data directly to a database. This phase is skipped if no database write operation is configured. The core task of Phase 3. Mapping transfers data from the source structure to the target structure according to defined rules. In the process, fields can be transformed, functions can be called, and values can be calculated.