I have set up an ASP.NET C# application that sends information to an azure storage account queue. Next l need to send the message text from within the queue to an azure sql database via means of a function. Format of the message text is as follows:
Id:VaccinationCenter:VaccinationDate:VaccineSerialNumber
E.g. 010203040506:Dubai:01/01/2002:AASB44
The table is created within Azure Database and contains the following columns: ID, Vaccination_Centre, Vaccination_Date, Vaccine_Serial_Number Any ideas how to achive this? Thanks
As @Scott Mildenberger commented we can alternatively use Azure Logic Apps to perform your requirement as below: Firstly, I have created a service bus queue as below:
Then create Logic App Then inside the workflow of the Logic App: Firstly, create a trigger when a new message comes inside the service bus queue as below:
The the queue messafe to string using base64ToString(triggerBody()?['ContentData'])
as below:
Then split the queue message using split(variables('emo'),':')
as below:
Then you can message to Sql Databse table using (Sql connector) create row as below:
For id its variables('div')[0]
VaccinationCenter its variables('div')[1]
vaccinationdate its variables('div')[2]
and VaccineSerialNumber it is variables('div')[3]
Then now send the message in Service bus queue as below:
Now time to check the run result:
Now its also in Sql database table:
If you follow this process, you will get your row inserted as mine got inserted.