How to implement a Python sql trigger V2 function app?

Thijs Verweij 0 Reputation points
2024-11-11T15:52:30.1766667+00:00

Hello,

I am trying to get the Python SQL trigger to work in Azure functions (https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-azure-sql-trigger?tabs=isolated-process%2Cpython-v2%2Cportal&pivots=programming-language-csharp). However, when I create the V2 model function app in Visual Studio Code, the SQL trigger is not listed:

User's image

Azure Function Core Tools version: v4.0.6543

Is there anything that I am missing here?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,185 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Khadeer Ali 1,210 Reputation points Microsoft Vendor
    2024-11-12T07:02:30.5833333+00:00

    Hi @Thijs Verweij,

    Welcome to the Microsoft Q&A Platform! Thank you for reaching out regarding the Azure SQL trigger binding for Azure Functions.

    Currently, the Azure SQL trigger binding is in preview, which means it has limited support and may not appear by default in some development environments, including Visual Studio Code. This binding is still evolving, so there may be additional setup steps needed to get it working in the Python V2 model.

    Since the SQL trigger may not appear in the Visual Studio Code UI, you can manually add it to your function code as described in Azure's SQL trigger documentation. Be sure to specify the database and table you want to monitor and configure the trigger settings directly in your function file.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.