Inserir
AI-generatedOverview
This node allows you to perform SQL operations on an Oracle database directly from your workflow. It supports executing arbitrary SQL queries as well as common data manipulation operations such as inserting, updating, and deleting rows in specified tables.
Typical use cases include:
- Automating data insertion into Oracle tables based on upstream workflow data.
- Updating records conditionally without manual intervention.
- Deleting obsolete or temporary data programmatically.
- Running custom SQL queries to fetch or manipulate data dynamically.
For example, you can insert new customer records into a "customers" table by specifying the columns and values, or update order statuses based on certain conditions.
Properties
| Name | Meaning |
|---|---|
| Tabela | The name of the target table for the operation (insert, update, delete). |
| Colunas / Valores | Columns and their corresponding values to be inserted or updated. |
| - Coluna | The column name in the table. |
| - Valor | The value to insert or update in the specified column. |
| Opções Adicionais | Additional options to customize the operation: |
| - Tamanho Máximo De Linhas | Maximum number of rows to return when fetching data (default 1000). |
| - Converter Datas ISO | Whether to convert date fields in the output to ISO string format (true/false). |
| - Commit Automático | Whether to automatically commit the transaction after the operation (true/false). |
Output
The node outputs an array of JSON objects, each representing the result of the executed operation per input item:
- For insert, update, and delete operations:
rowsAffected: Number indicating how many rows were affected by the operation.
- For executeQuery operation:
rows: An array of objects representing the fetched rows, with keys as column names and values as the respective data.- If the "Converter Datas ISO" option is enabled, any Date objects in the output are converted to ISO 8601 string format.
No binary data output is produced by this node.
Dependencies
- Requires an Oracle database connection configured via credentials that provide user, password, host, port, and connection details.
- Uses the official OracleDB Node.js driver (
oracledbpackage). - The node expects proper network access to the Oracle database instance.
- n8n credential configuration must include necessary authentication information for the Oracle database.
Troubleshooting
- Connection errors: Ensure the Oracle database credentials and connection details (host, port, service name/SID) are correct and accessible from the n8n environment.
- SQL syntax errors: Verify that the SQL statements or table/column names are valid and properly formatted.
- Missing WHERE clause in update/delete: Omitting or incorrectly specifying the WHERE clause may lead to unintended data changes or errors.
- Commit issues: If changes do not persist, check if "Commit Automático" is enabled; otherwise, manual commit might be required.
- Date conversion: If dates appear incorrect, toggle the "Converter Datas ISO" option to ensure consistent date formatting.
- Unsupported operation error: Using an operation other than executeQuery, insert, update, or delete will cause an error.