0
votes

I user those and run Azure Functions at local environment.

Azure Functions Core Tools (2.0.3)

Function Runtime Version:2.0.12115.0

[email protected]

I try as Microsoft document says. Here is functions.json

{
  "bindings": [
    {
      "name": "input",
      "type": "httpTrigger",
      "direction": "in"
    },
    {
      "tableName": "Person",
      "connection": "MyStorageConnectionAppSetting",
      "name": "tableBinding",
      "type": "table",
      "direction": "out"
    }
  ],
  "disabled": false
}

Here is local.settings.json

{
  "IsEncrypted": false,
  "Values": {
    "FUNCTIONS_WORKER_RUNTIME": "node",
    "MyStorageConnectionAppSetting": "UseDevelopmentStorage=true"
  }
}

Here is index.js

module.exports = function (context) {

    context.bindings.tableBinding = [];

    for (var i = 1; i < 10; i++) {
        context.bindings.tableBinding.push({
            PartitionKey: "Test",
            RowKey: i.toString(),
            Name: "Name " + i
        });
    }

    context.done();
};

Installed extensions with this.

$ func extensions install -p Microsoft.Azure.WebJobs.Extensions.Storage --version 3.0.0

Run functions from mac terminal, Send http request, I got this error.

System.Private.CoreLib: Exception while executing function: Functions.test. Microsoft.Azure.WebJobs.Host: Error while handling parameter _binder after function returned:. Microsoft.Azure.WebJobs.Extensions.Storage: Not Implemented (HTTP status code 501: . ). Microsoft.WindowsAzure.Storage: Not Implemented.

Error from Table Storage

POST /devstoreaccount1/$batch 501 0.980 ms - 45

Any help?

1

1 Answers

0
votes

UseDevelopmentStorage=true represents function is set to use Storage emulator, which provides a local environment that emulates the Azure Storage Blob, Queue and Table services for development purposes. But unfortunately it's only available on OS Windows, so you got Not Implemented on Mac.

Workaround is to use a real world Storage account, follow the tutorial to get the Connection string, if you don't have a Storage account you may have to create one first.

One more suggestion is install latest Azure Functions Core Tools, right now it's 2.1.725.