# SQL

Category: Storage
|
Runtime: 2.1+
|
Available: Free

# Overview

SQL node is a generic node that connects and execute queries against MySQL or Postgres or MSSQL database. The node support the driver for all the 3 databases.

# Setup

# Prerequisites

For SQL node to work properly, you need to have necessary connection details and credentials for connecting with the cloud based or on-premise instance of MySQL or Postgres or MSSQL database.

# Installation

To install the node from designer:

  1. Go to Add more nodes option on the palette section.
  2. Check for the SQL node and click install.
  3. Once installed, the designer is required to be restarted.

To install the node from CLI:

  1. Go to your project workspace where you can see your package.json file.
  2. Run the below give npm command.
    npm i @kumologica/kumologica-contrib-sql

# Technical Details

Properties

  • Provider (Required)
    The database against which the SQL query needs to be executed. Supports MySQL, Postgres and MSSQL.
  • Host (Required)
    The hostname associated with the database instance to be connected.
  • Port (Required)
    The port associated with the database instance to be connected.
  • Database Name (Required)
    Name of the database.
  • Timeout (Required)
    Query execution timeout. An error will be thrown if the query does not complete execution within this Timeout duration.
  • Username (Required)
    Username for database authentication.
  • Password (Required)
    Password for database authentication.
  • Query (Required)
    The SQL query that needs to be executed.

Note
512 mb is the minimum memory requirement for your AWS lambda deployment when using SQL node.

Supported Operations

Not Applicable

Throws

SQL node throws the following exception.

  • GenericSQLNodeError - When any kind of error occurs during the execution of the query, including errors related to connectivity to the database.

Returns

Payload is overwritten by this node. On successful execution, the result of the query execution will be set to msg.payload and be available for further processing.