Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Query Azure Table storage from Logic App | How to filter results of Azure Table storage from Logic App

{tocify} $title={Table of Contents}


Introduction

Azure Table storage is a service that stores non-relational structured data (also known as structured NoSQL data) in the cloud, providing a key/attribute store with a schemaless design.

Because Table storage is schemaless, it's easy to adapt your data as the needs of your application evolve. Access to Table storage data is fast and cost-effective for many types of applications, and is typically lower in cost than traditional SQL for similar volumes of data. 

You can use Table storage to store flexible datasets like user data for web applications, address books, device information, or other types of metadata your service requires. You can store any number of entities in a table, and a storage account may contain any number of tables, up to the capacity limit of the storage account.

Azure tables are ideal for storing structured, non-relational data.

Common uses of Table storage include:

- Storing TBs of structured data capable of serving web scale applications
- Storing datasets that don't require complex joins, foreign keys, or stored procedures and can be denormalized for fast access
- Quickly querying data using a clustered index
- Accessing data using the OData protocol and LINQ queries with WCF Data Service .NET Libraries.


Scenario

In current project, requirement was to store the records which are not Processed (due to some business condition) and needs to retried in regular intervals.

So, there was need of storage - SQL and Azure Table storage were the options. But SQL for this is too costly, so considered going with Table Storage.

In the first process(workflow) the records(whichever were not processed) were inserted in Table storage and in next scheduled process(workflow) same records were fetched and sent for processing.

Creating a Solution

For the sake of demo, will create a Azure Table storage and will add entities manually(Process 1) and later fetch them in Logic app querying it(Process 2).

Creating table in Azure storage

As can be seen in below image, tfpocazuretable is created and manually few entities are added



Logic app to fetch entities from Azure Table Storage 

Created a demo workflow with Recurrence trigger followed by Query Entities action.



First thing is to create connection followed by selecting option to query, options available are:

Continuation Token --  The continuation token from a previous call.
Filter --  The operation only returns the values that satisfy the specified filter contitions.
Selected Properties -- Specify the list of properties to be included in result.
Top -- Top entities

 



Here Filter is selected, so all entities with all properties matching the condition is to be returned. 

If not all properties are needed, then combination of Filter and Selected properties can be used.


Consider Filter as Where clause here, supported operators are as below

Went ahead with Filter alone, with Flag property equal to true

That's it. 


Testing

For testing, manually run the workflow, checked the runhistory


Below is the raw output


As can be seen in  above image, only those entities are returned which have Flag as true.


Learn More about Logic App

  • Developing Logic app standard workflow which uses Map locally  and deploying to Azure
  • Developing Logic App Standard Workflow Using Visual Studio Code | Create Logic App Standard Workflow Using Visual Studio Code
  • Logic App - Xml to Json using Liquid Map | Append in Liquid Map
  • How to use Azure Event Grid Custom Topic | Publishing and Subscribing from Azure Event Grid Custom Topic using Logic App
  • Using Azure Storage Account Table as Config Store  for Logic Apps | How to read and write from Logic App to Azure Storage Account Table
  • Get Logic App Name in Logic App
  • Difference between Logic App Consumption and Logic App Standard 
  • Getting Started with Logic App Standard | Overview of Logic App Standard | Basics of Logic App Standard
  • How to find count of Logic App executions using Azure Portal
  • Azure Functions vs Azure Logic App | Difference between Azure Functions and Azure Logic App
  • Getting started with Logic App : Liquid Map | Using Liquid template in Logic app
  • How to get actual error message of Scope in Logic App | Exception Handling in Logic app
  • Interview questions and answers on Logic Apps | Interview questions for azure logic app developers
  • How to execute Stored Procedure in Logic App | How to connect to SQL in Logic App
  • How to get current date in logic app | How to format date time in Logic App
  • BizTalk Developer getting started with Logic App
  • Getting Started with Logic Apps - Fundamentals
  • Getting Started with Logic Apps - Enterprise Application Integration
  • Getting Started with Logic Apps - AS2
  • Getting Started with Logic Apps - EDI X12 Fundamentals
  • Getting Started with Logic Apps - XML to EDI X12
  • Getting Started with Logic Apps - EDI X12 to XML
  • Getting Started with Logic Apps - What happened to the Request?
  • Inserting Multiple Records In On Prem SQL Using Logic App
  • Inserting data in On Premises SQL Database using Logic Apps
  • Installing and Configuring On Premises Data Gateway - By adding user to Active Directory
  • XML Batching(Aggregation) in Logic App
  • Batching(Aggregating) messages in Logic App
  • Debatching(Splitting) JSON Message in Logic Apps - ForEach and SplitOn
  • Debatching(Splitting) XML Message in Logic Apps - ForEach and SplitOn
  • Securing Logic App with Azure Active Directory authentication
  • Removing ns0: prefix from xml output from BizTalk/Logic app XSLT map
  • Using Managed Identity in Logic Apps for Calling Active Directory Secured Function App
  • Logic Apps : Fetching ISA and GS Segment Values From Interchange Envelope and Mapping
  • Logic Apps : For Each Inside a For Each - Fetching values from field in an array inside an array



This post first appeared on TechFindings, please read the originial post: here

Share the post

How to Query Azure Table storage from Logic App | How to filter results of Azure Table storage from Logic App

×

Subscribe to Techfindings

Get updates delivered right to your inbox!

Thank you for your subscription

×