SQL Executor

Connect to the specified database to execute SQL instructions and analyze the results

TYPE

Choosing the database type. If oracle is selected, the Oracle SQL Developer client library is also required to be installed on your local machine: mysql, postgres, oracle, mssql

HOST

Database host, which can be an IP address or host domain name.

PORT

Database host port number.

USER

User account name for connecting to the database. Supports %FILENAME% variable.

PASSWORD

The password for the user account filled above. Supports %FILENAME% variable.

DATABASE

Database name. Supports %FILENAME% variable.

SQL STATEMENT

SQL commands executed on the specified database. %FILENAME% variables can be used within the commands: SELECT * from %price%

Input Object

In the input array, each element represents a record retrieved from an SQL query. The object contains keys representing the columns of the queried table and their corresponding values for that specific record.

Output Object

Each key added to the output object will be output as a .txt file in the workspace. The file name will be the key, and the text content will be the corresponding value.

// Write the result to the text file 'total.txt' in the workspace
let total = 0
input.forEach((row) => total = total + row.price)
output['total'] = total

--

We are dedicated to improving our content. Please let us know if you come across any errors, including spelling, grammar, or other mistakes, as your feedback is valuable to us! 🤖️⚡️

Last updated