Azure SQL icon

Azure SQL

Get, add and update data in Azure SQL

Delete

AI-generated

Overview

This node allows users to perform operations on an Azure SQL database. Specifically, for the "Delete" operation, it is designed to delete rows from a specified database table. This can be useful in scenarios where you need to remove outdated or unwanted data programmatically as part of an automated workflow.

Typical use cases include:

  • Cleaning up records that meet certain criteria.
  • Removing test or temporary data after processing.
  • Automating data lifecycle management by deleting old entries.

In this implementation, the actual deletion logic is not fully implemented; instead, it returns a message indicating that the delete operation would be executed with the specified database.

Properties

Name Meaning
Database Name The name of the database to use for the operation. If left blank, the default database from credentials will be used.

Output

The output is a JSON array containing objects with messages about the operation performed. For the Delete operation, since the actual deletion is not implemented, the output will be:

[
  {
    "message": "delete operation would be executed here with database: <database_name>"
  }
]

If an error occurs and the node is set to continue on failure, the output will contain an object with an error field describing the issue.

Dependencies

  • Requires connection credentials to an Azure SQL database, including server, port, user, password, and optionally domain and TLS settings.
  • Uses the mssql Node.js package to connect and interact with the Azure SQL database.
  • Requires proper configuration of these credentials within n8n to establish a successful connection.

Troubleshooting

  • Connection errors: Ensure that the provided credentials (server, user, password, database) are correct and that the Azure SQL server is accessible from the environment where n8n runs.
  • Timeouts: Connection or request timeouts may occur if the server is slow or unreachable. Adjust timeout settings in credentials if needed.
  • Operation not implemented: The Delete operation currently does not execute actual SQL delete commands but returns a placeholder message. To perform real deletions, custom SQL queries should be used via the Execute Query operation.
  • Error handling: If the node throws errors during execution, enabling "Continue On Fail" will allow the workflow to proceed and output error details in JSON format.

Links and References

Discussion