skip to Main Content

I am trying to implement a very basic functionality, as follows: when a row is added in an Azure SQL Database the contents of that row are sent to a Service Bus Queue.

How to add row contents to 'Send Message' content

(1)How do I send the ‘row’ as parameter to the ‘send message content’? (2)What kind of object does ‘get row’ create, and what kind of formatting does it need to be sent over to the Service Bus Queue? (3)Can’t this whole operation be done with an Azure Function, rather than logic apps ? (I couldn’t find an SQL trigger for Azure Functions).

Thank you in advance.

2

Answers


  1. There is no SQL trigger for azure functions. But, if you want to use azure functions for doing the same operation, you could use a HttpTrigger in logic app.

    Just pass in the Unique Identifier of the inserted row as query parameter or in the request body. Then, read the data from DB and do the processing in azure functions.

    If you are going the service bus route, you can pass data in JSON format and de-serialize this JSON at the retrieving end.

    Login or Signup to reply.
    1. We have created logic app as shown below:

    enter image description here

    1. Created a compose action to get newly added row content as shown below:
      enter image description here

    2. Assigned value of compose to a variable as shown below:

    enter image description here

    1. In send message action, giving value of variable in content.
      enter image description here

    2. Logic app ran successfully.
      enter image description here

    3. Message received in service bus queue.
      enter image description here

    4. You can get primary column by writing expression as “triggerBody()?[primarycolumnname]”
      enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search