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:
Alpha
The component definition and tasks are defined in the definition.yaml and tasks.yaml files respectively.
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>}.
Field Field ID Type Note Engine (required) enginestring Choose the engine of your database. Enum values MySQLPostgreSQLSQL ServerOracleMariaDBFirebird Username (required) usernamestring Fill in your account username. Password (required) passwordstring Fill in your account password. Database Name (required) database-namestring Fill in the name of your database. Host (required) hoststring Fill in the host of your database. Port (required) portnumber Fill in the port of your database. SSL / TLS (required)ssl-tlsobject Enable SSL / TLS.
The ssl-tls Object SSL TLS ssl-tls must fulfill one of the following schemas:
No SSL / TLSField Field ID Type Note SSL / TLS Type ssl-tls-typestring Must be "NO TLS"
TLSField Field ID Type Note CA Certificate ssl-tls-castring Base64 encoded CA certificate file. SSL / TLS Type ssl-tls-typestring Must be "TLS"
mTLSField Field ID Type Note CA Certificate ssl-tls-castring Base64 encoded CA certificate file. Client Certificate ssl-tls-certstring Base64 encoded client certificate file. Client Key ssl-tls-keystring Base64 encoded client key file. SSL / TLS Type ssl-tls-typestring Must be "mTLS"
Perform insert operation
Input Field ID Type Description Task ID (required) taskstring TASK_INSERTTable Name (required) table-namestring The table name in the database to insert data into. Data (required) dataobject The data to be inserted.
Output Field ID Type Description Status statusstring Insert status.
Perform insert operation with multiple rows
Input Field ID Type Description Task ID (required) taskstring TASK_INSERT_MANYTable Name (required) table-namestring The table name in the database to insert data into. Data (required)array-dataarray[object] The array data to be inserted.
Output Field ID Type Description Status statusstring Insert many status.
Perform update operation
Input Field ID Type Description Task ID (required) taskstring TASK_UPDATETable Name (required) table-namestring The table name in the database to update data into. Filter (required) filterstring The filter to be applied to the data with SQL syntax, which starts with WHERE clause. Update (required) update-dataobject The new data to be updated to.
Output Field ID Type Description Status statusstring Update status.
Perform select operation
Input Field ID Type Description Task ID (required) taskstring TASK_SELECTTable Name (required) table-namestring The table name in the database to be selected. Filter filterstring The filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for all rows. Limit limitinteger The limit of rows to be selected, empty for all rows. Columns columnsarray[string] The columns to return in the rows. If empty then all columns will be returned.
Output Field ID Type Description Rows rowsarray[json] The rows returned from the select operation. Status statusstring Select status.
Perform delete operation
Input Field ID Type Description Task ID (required) taskstring TASK_DELETETable Name (required) table-namestring The table name in the database to be deleted. Filter (required) filterstring The filter to be applied to the data with SQL syntax, which starts with WHERE clause.
Output Field ID Type Description Status statusstring Delete status.
Create a table in the database
Input Field ID Type Description Task ID (required) taskstring TASK_CREATE_TABLETable Name (required) table-namestring The table name in the database to be created. Columns (required) columns-structureobject The columns structure to be created in the table, json with value string, e.g {"name": "VARCHAR(255)", "age": "INT not null"}.
Output Field ID Type Description Status statusstring Create table status.
Drop a table in the database
Input Field ID Type Description Task ID (required) taskstring TASK_DROP_TABLETable Name (required) table-namestring The table name in the database to be dropped.
Output Field ID Type Description Status statusstring Drop table status.