Azure SQL icon

Azure SQL

Get, add and update data in Azure SQL

Insert

AI-generated

Overview

This node allows you to interact with an Azure SQL database by performing various operations such as executing SQL queries, inserting rows, updating rows, and deleting rows. It is particularly useful for automating data workflows that involve Azure SQL databases, such as syncing data from other sources, running reports, or managing database records programmatically.

For the Insert operation specifically, the node would insert rows into a specified database table. Although the provided code snippet does not show detailed insert logic (it returns a placeholder message), in practice this operation would be used to add new records to your Azure SQL database tables.

Practical examples:

  • Automatically inserting new customer records collected from a web form into an Azure SQL database.
  • Adding transaction logs or audit trails into a database after processing events.
  • Populating lookup tables with data from external APIs.

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: The node also supports an "Operation" property with options like Execute Query, Insert, Update, Delete, but since the focus here is on the Insert operation, only the Database Name property is listed as input.

Output

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

  • For the Insert operation (as per the current code), the output is a JSON object with a message indicating that the insert operation would be executed along with the database name.
  • In a fully implemented version, the output would typically include details about the inserted rows or confirmation of successful insertion.
  • The node does not output binary data.

Example output for Insert operation (placeholder):

[
  {
    "message": "insert operation would be executed here with database: myDatabase"
  }
]

Dependencies

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

Troubleshooting

  • Connection errors: Ensure the Azure SQL server address, port, username, and password are correct. Verify network connectivity and firewall rules allow access.
  • Authentication failures: Check that the API key or authentication token has sufficient permissions and is valid.
  • Timeouts: Adjust connectionTimeout and requestTimeout settings if queries take longer than expected.
  • Query errors: For other operations like Execute Query, syntax errors in SQL statements will cause failures. Validate SQL syntax before running.
  • Placeholder output for Insert: Currently, the Insert operation returns a placeholder message instead of performing actual inserts. This indicates incomplete implementation; verify if the node version supports full insert functionality.

Links and References

Discussion