Azure SQL icon

Azure SQL

Get, add and update data in Azure SQL

Update

AI-generated

Overview

This node allows you to interact with an Azure SQL database by performing various operations such as executing arbitrary SQL queries, inserting rows, updating rows, and deleting rows. The "Update" operation specifically enables you to update existing records in a specified database table.

Common scenarios where this node is beneficial include:

  • Automating data updates in Azure SQL databases based on workflows.
  • Synchronizing data between different systems by updating records programmatically.
  • Running dynamic SQL update statements as part of data processing pipelines.

For example, you might use the "Update" operation to modify customer information in your database when new data arrives from another system or to correct records based on business rules.

Properties

Name Meaning
Database Name Name of the database to use. If left blank, the default database configured in the credentials will be used.

Note: Although the bundled code shows multiple operations, here we focus on the "Update" operation. The node also supports other operations like executing queries, inserting, and deleting rows.

Output

The output is a JSON array representing the result of the operation:

  • For the "Update" operation, the current implementation returns a JSON object with a message indicating that the update operation would be executed along with the database name. This suggests that the actual update logic is not implemented in the provided code snippet but is intended to be added.

  • For the "Execute Query" operation (not requested here), the output contains the query results as an array of JSON objects, each representing a row.

  • In case of errors, if the node is set to continue on failure, the output will contain an error message object.

No binary data output is produced by this node.

Dependencies

  • Requires an Azure SQL database connection.
  • Needs an API key credential or authentication token for Azure SQL access.
  • Uses the mssql Node.js package to connect and execute commands against the Azure SQL server.
  • Requires proper configuration of connection parameters such as server, port, user, password, and optionally domain and TLS settings.

Troubleshooting

  • Connection failures: Ensure that the Azure SQL server details and credentials are correct and that network access is allowed.
  • Timeouts: Adjust connection and request timeout settings if queries take longer than expected.
  • Permission errors: Verify that the authenticated user has sufficient permissions to perform update operations on the target database.
  • Unimplemented update logic: Currently, the "Update" operation only returns a placeholder message. Implementing actual update queries is necessary for functional updates.
  • Error handling: If the node throws errors, enabling "Continue On Fail" can help capture error messages in the output for debugging.

Links and References

Discussion