0

Is there a way to bind the table in java azure functions similar to c#

[FunctionName("TableInput")]
public static void Run(
[QueueTrigger("table-items")] string input, 
[Table("MyTable", "Http", "{queueTrigger}", Connection = 
"StorageConnectionAppSetting")] MyPoco poco, 
TraceWriter log)
{
...
}

Something like this? I dont want to use the azure storage library to manually fetch the table.

Ganesh Chippada
  • 113
  • 1
  • 12

1 Answers1

0

Use TableInput annotation:

@TableInput(name = "item", tableName = "MyTable", partitionKey = "Http", 
    rowKey = "{queueTrigger}", connection = "StorageConnectionAppSetting") MyPojo pojo

See example in Building Microsoft Azure Functions in Java.

Mikhail Shilkov
  • 34,128
  • 3
  • 68
  • 107