
Azure Logic Apps Toolbox 1-Use the OData Filter for Azure SQL Databases
A very quick tip today: When using an Azure Logic App in combination with an Azure SQL Database, filtering rows can be done like here. As example: A T-SQL query as this one… SELECT - FROM [dbo].[Customers] WHERE [StorageDataSentDate] IS NULL ORDER BY [Id] …will be formulated as filter expression with an OData query as here. The definition for the Get_rows_(V2) action looks similar as here: … "Get_rows_(V2)": { "inputs": { "host": {"connection": {"name": "@parameters('$connections')['sql']['connectionId']"} }, "method": "get", "path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('[someserver].database.windows.net'))}, @{encodeURIComponent(encodeURIComponent('governancetoolkit365'))}/tables/ @{encodeURIComponent(encodeURIComponent('[dbo].[Customers]'))}/items", "queries": {"$filter": "(StorageDataSentDate eq null)", $orderby": "Id"} }, "runAfter": {"Initialize_variable": ["Succeeded"]}, "runtimeConfiguration": { "paginationPolicy": {"minimumItemCount": 5} }, "type": "ApiConnection" }, … Depending on the data size, remember to configure pagination. ...





