'How to retrieve all rows using Azure Table Storage bindings for Azure Functions

I am using azure table storage bindings as described here https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-table-input?tabs=in-process%2Cstorage-extension&pivots=programming-language-javascript

I have it setup and working, but in my javascript, I reference it as such

context.log(context.bindings.entity.length);

This outputs 50 even though the table has 745 records.

I have tried iterating it, and filtering it as such

var foo = context.bindings.entity.map( (x) => x.Partition ); // only outputs 50 records
var bar = context.bindings.entity.filter( (x) => x.RowKey == "700" ); // does not find anything because the RowKey is the 700th item, and it only has 50

I need a way of getting all data from the azure table and filtering out what I need.



Solution 1:[1]

Retrieve all rows using Azure Table Storage bindings

Create Azure Function and + Add HTTP trigger -> Now click on to the Integrate tab -> Click on the New Input and Select Azure Table Storage from the list -> Set up Azure Table storage

Note: The Partition key and Row key fields are optional. Make sure to fill in the maximum number of records to read, then only it will read all records.

ref1 Now go to the index.js file .Open it and replace its content with the following code.

module.exports = async function (context, req) {
    context.log(context.bindings.inputTable.FirstName);
};

Ref2

Reference:

https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-table-input?tabs=in-process%2Cstorage-extension&pivots=programming-language-javascript

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1