Using logic App to log query result from log analytics to sql table.

Adeleke Abimbola 231 Reputation points
2021-09-21T07:17:15.82+00:00

I recently was able to use Azure logic app to send the query result from log analytics as an email.....Now I'm trying to do a parallel activity so as to be able to log the same result or a different query result to an SQL table. I'm confused about the process and what actions will be needed. Any help with this will be appreciated.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,922 questions
Azure SQL Database
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,935 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anurag Sharma 17,581 Reputation points
    2021-09-21T11:10:11.3+00:00

    Hi @Adeleke Abimbola , welcome to Microsoft Q&A forum.

    You can configure the Logic App as mentioned below to read from Log analytics and populate an existing Azure SQL table.

    1). Set up Run Query and List Result. Please note I am selecting 2 columns only in the Query text.

    133835-image.png

    2). Then we need to add another step where we loop through the result and insert into Azure SQL Database.

    133917-image.png

    3). This is going to insert these records into database table, we can check the same on database:

    133850-image.png

    Referenced Article: Log Analytics queries to CSV emailed using Azure Logic Apps

    Please let us know if this helps or else we can discuss further on the same.

    ----------

    Please don't forgot to click on accept it as answer button 133869-image.png wherever the information provided helps you. This can be beneficial to other community members as well..

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful