SQL

The SQL component is a data component that allows users to access the SQL database of your choice. It can carry out the following tasks:

#Release Stage

Alpha

#Configuration

The component definition and tasks are defined in the definition.json and tasks.json files respectively.

#Setup

In order to communicate with the external application, the following connection details need to be provided. You may specify them directly in a pipeline recipe as key-value pairs within the component's setup block, or you can create a Connection from the Integration Settings page and reference the whole setup as setup: ${connection.<my-connection-id>}.

FieldField IDTypeNote
Engine (required)enginestringChoose the engine of your database.
Enum values
  • MySQL
  • PostgreSQL
  • SQL Server
  • Oracle
  • MariaDB
  • Firebird
Username (required)usernamestringFill in your account username.
Password (required)passwordstringFill in your account password.
Database Name (required)database-namestringFill in the name of your database.
Host (required)hoststringFill in the host of your database.
Port (required)portnumberFill in the port of your database.
SSL / TLS (required)ssl-tlsobjectEnable SSL / TLS.
The ssl-tls Object

SSL TLS

ssl-tls must fulfill one of the following schemas:

No SSL / TLS
FieldField IDTypeNote
SSL / TLS Typessl-tls-typestringMust be "NO TLS"
TLS
FieldField IDTypeNote
CA Certificatessl-tls-castringBase64 encoded CA certificate file.
SSL / TLS Typessl-tls-typestringMust be "TLS"
mTLS
FieldField IDTypeNote
CA Certificatessl-tls-castringBase64 encoded CA certificate file.
Client Certificatessl-tls-certstringBase64 encoded client certificate file.
Client Keyssl-tls-keystringBase64 encoded client key file.
SSL / TLS Typessl-tls-typestringMust be "mTLS"

#Supported Tasks

#Insert

Perform insert operation

InputIDTypeDescription
Task ID (required)taskstringTASK_INSERT
Table Name (required)table-namestringThe table name in the database to insert data into.
Data (required)dataobjectThe data to be inserted.
OutputIDTypeDescription
StatusstatusstringInsert status.

#Insert Many

Perform insert operation with multiple rows

InputIDTypeDescription
Task ID (required)taskstringTASK_INSERT_MANY
Table Name (required)table-namestringThe table name in the database to insert data into.
Data (required)array-dataarray[object]The array data to be inserted.
OutputIDTypeDescription
StatusstatusstringInsert many status.

#Update

Perform update operation

InputIDTypeDescription
Task ID (required)taskstringTASK_UPDATE
Table Name (required)table-namestringThe table name in the database to update data into.
Filter (required)filterstringThe filter to be applied to the data with SQL syntax, which starts with WHERE clause.
Update (required)update-dataobjectThe new data to be updated to.
OutputIDTypeDescription
StatusstatusstringUpdate status.

#Select

Perform select operation

InputIDTypeDescription
Task ID (required)taskstringTASK_SELECT
Table Name (required)table-namestringThe table name in the database to be selected.
FilterfilterstringThe filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for all rows.
LimitlimitintegerThe limit of rows to be selected, empty for all rows.
Columnscolumnsarray[string]The columns to return in the rows. If empty then all columns will be returned.
OutputIDTypeDescription
Rowsrowsarray[object]The rows returned from the select operation.
StatusstatusstringSelect status.

#Delete

Perform delete operation

InputIDTypeDescription
Task ID (required)taskstringTASK_DELETE
Table Name (required)table-namestringThe table name in the database to be deleted.
Filter (required)filterstringThe filter to be applied to the data with SQL syntax, which starts with WHERE clause.
OutputIDTypeDescription
StatusstatusstringDelete status.

#Create Table

Create a table in the database

InputIDTypeDescription
Task ID (required)taskstringTASK_CREATE_TABLE
Table Name (required)table-namestringThe table name in the database to be created.
Columns (required)columns-structureobjectThe columns structure to be created in the table, json with value string, e.g {"name": "VARCHAR(255)", "age": "INT not null"}.
OutputIDTypeDescription
StatusstatusstringCreate table status.

#Drop Table

Drop a table in the database

InputIDTypeDescription
Task ID (required)taskstringTASK_DROP_TABLE
Table Name (required)table-namestringThe table name in the database to be dropped.
OutputIDTypeDescription
StatusstatusstringDrop table status.