azure-functions-sql-extension icon indicating copy to clipboard operation
azure-functions-sql-extension copied to clipboard

Feature request: Sql trigger params

Open IlyaGazman opened this issue 2 years ago • 1 comments

When triggering via SQL, it would be awesome if you could allow the columns in the trigger to be used in the input binding, like it is done with HTTP trigger params.

Example

{
    "bindings": [
      {
        "name": "changes",
        "type": "sqlTrigger",
        "direction": "in",
        "tableName": "[dbo].[Products]",
        "params": ["Cost"]
        "connectionStringSetting": "AzureSQLConnectionString"
      },
      {
        "name": "products",
        "type": "sql",
        "direction": "in",
        "commandText": "select * from Products where Cost = @Cost",
        "commandType": "Text",
        "parameters": "@Cost={cost}",
        "connectionStringSetting": "SqlConnectionString"
      }
    ]
  }

IlyaGazman avatar Oct 10 '23 15:10 IlyaGazman

Thank you IlyaGazman for the feature request. We will take a close look at this. It would also be useful in output bindings for moving specific data from one place to another based on a trigger. Less code is always a good thing.

JetterMcTedder avatar Oct 10 '23 19:10 JetterMcTedder