SQL Executor
Connect to a specified database, execute SQL commands, and analyze the results.

Parameters
TYPE - Select the database type. Supports mysql, postgres, oracle, mssql, and other database types.
HOST - Database host, can be an IP address or host domain name.
PORT - Database host port number.
USER - User account name for connecting to the database. Supports the %FILENAME% variable.
PASSWORD - User account password for connecting to the database. Supports the %FILENAME% variable.
DATABASE - Database name. Supports the %FILENAME% variable.
SQL STATEMENT - SQL command to execute on the specified database. %FILENAME% template:
SELECT * from %price%;
No-Code Editor

Low-Code Editor

input Array
Each element in the input array represents a row of data from the SQL query. The key in the object is the table column, and the value is the data for that column in this row.
output Object
Each key added to the output object will be exported as a TXT file in the working folder. The filename is the key, and the text content is the corresponding value.
// Write analysis results to total.txt in the working folder
let total = 0
input.forEach((row) => total = total + row.price)
output['total'] = total