Alex
Alex

Reputation: 33

Azure function (VS2017) SQL table binding

I'm trying to bind data from AF to Azure SQL. It's easy to do in Azure Portal adding the binding params in function.json file

 {
  "type": "apiHubTable",
  "name": "outputTable",
  "dataSetName": "default",
  "tableName": "SpeechToText",
  "connection": "sql_SQL",
  "direction": "out"
}

But I cant do this in VS2017 preview( Binding to Azure SQL is unavailable)

enter image description here

Upvotes: 1

Views: 416

Answers (1)

Mikhail Shilkov
Mikhail Shilkov

Reputation: 35134

You need to reference Microsoft.Azure.WebJobs.Extensions.ApiHub NuGet package

Install-Package Microsoft.Azure.WebJobs.Extensions.ApiHub -Version 1.0.0-beta3 -Pre

and then use ApiHubTable attribute for your binding

[ApiHubTable("sql_SQL", DataSetName = "default", TableName = "SpeechToText")]

Upvotes: 2

Related Questions