MySQL Stored Procedure

Overview

This Snap executes a stored procedure in a MySQL database and writes the values of OUT and INOUT parameters to the output views.

ETL Transformations & Data Flow

The Snap invokes the Stored procedure, and the ETL operations are carried out as specified on the stored procedure.

Ideally, there is no data flow from the Snap to the database, however, the results computed in the stored procedure or the result of queries executed in the stored procedure can be fetched by the Snap through output parameters.

Prerequisites

A valid account with EXECUTE privileges on the stored procedures in the target MySQL database.

Snap views

Type Description Examples of upstream and downstream Snaps
Input Each input document provides parameter values for the stored procedure. The Snap maps document fields to procedure input parameters.
Output Each output document contains the result sets and output parameter values returned by the stored procedure execution.
Learn more about Error handling.

Snap settings

Legend:
  • Expression icon (): Allows using pipeline parameters to set field values dynamically (if enabled). SnapLogic Expressions are not supported. If disabled, you can provide a static value.
  • SnapGPT (): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
  • Suggestion icon (): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
  • Upload : Uploads files. Learn more.
Learn more about the icons in the Snap settings dialog.
Field/Field set Description
Label

String
Required.

Specify a name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Default value: MySQL Stored Procedure

Example: MySQL Stored Procedure
Schema

String/Expression

Optional.The database schema name where the stored procedure is located. If not specified, the default schema associated with the account is used.
Procedure Name

String/Expression

Required.The name of the stored procedure to execute.

Example: calculate_employee_bonus

Parameters

Table

Optional.A table defining the input and output parameters for the stored procedure. Each row specifies a parameter name, type (IN, OUT, INOUT), and data type.
Number of Retries

Integer

Optional.The number of times the Snap should retry the operation in case of failure.

Default value: 0

Retry Interval (seconds)

Integer

Optional.The time interval in seconds between retry attempts.

Default value: 1

Snap execution

String/Suggestion

Select one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.
  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.