az stream-analytics function

Commands to manage stream-analytics function.

Commands

az stream-analytics function create

Create a function or replaces an already existing function under an existing streaming job.

az stream-analytics function delete

Delete a function from the streaming job.

az stream-analytics function list

List all of the functions under the specified streaming job.

az stream-analytics function show

Get details about the specified function.

az stream-analytics function test

Test if the information provided for a function is valid.

az stream-analytics function create

Create a function or replaces an already existing function under an existing streaming job.

az stream-analytics function create --binding
                                    --function-output
                                    --inputs
                                    --job-name
                                    --name
                                    --resource-group
                                    [--type {Scalar}]

Examples

Create a function

az stream-analytics function create --resource-group MyResourceGroup --job-name MyJobName \
--name MyFunctionName --inputs @inputs.json --function-output @output.json --binding \
@binding.json
 (below is an example for "inputs.json")
 [
     {
         "dataType": "Any"
     }
 ]
 (below is an example for "output.json")
 {
     "dataType": "Any"
 }
 (below is an example of JavascripUDF for "binding.json")
 {
     "type": "Microsoft.StreamAnalytics/JavascriptUdf",
     "properties": {
         "script": "function (x, y) { return x + y; }"
     }
 }
 (below is an example of Azure Machine Learning for "binding.json")
 {
     "type": "Microsoft.MachineLearning/WebService",
     "properties": {
         "endpoint": "someAzureMLEndpointURL",
         "apiKey": "someApiKey==",
         "inputs": {
             "name": "input1",
             "columnNames": [
                 {
                     "name": "tweet",
                     "dataType": "string",
                     "mapTo": 0
                 }
             ]
         },
         "outputs": [
             {
                 "name": "Sentiment",
                 "dataType": "string"
             }
         ],
         "batchSize": 1000
     }
 }

Required Parameters

--binding

The binding of the function.

--function-output

The output of the function.

--inputs

The inputs of the function.

--job-name

The name of the streaming job.

--name -n

The name of the function.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--type

The udf type of the function.

accepted values: Scalar
default value: Scalar

az stream-analytics function delete

Delete a function from the streaming job.

az stream-analytics function delete --job-name
                                    --name
                                    --resource-group

Examples

Delete a function

az stream-analytics function delete --resource-group MyResourceGroup --job-name MyJobName \
--name MyFunctionName

Required Parameters

--job-name

The name of the streaming job.

--name -n

The name of the function.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az stream-analytics function list

List all of the functions under the specified streaming job.

az stream-analytics function list --job-name
                                  --resource-group

Examples

List all functions in a streaming job

az stream-analytics function list --resource-group MyResourceGroup --job-name MyJobName

Required Parameters

--job-name

The name of the streaming job.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az stream-analytics function show

Get details about the specified function.

az stream-analytics function show --job-name
                                  --name
                                  --resource-group

Examples

Get details about a function

az stream-analytics function show --resource-group MyResourceGroup --job-name MyJobName --name \
MyFunctionName

Required Parameters

--job-name

The name of the streaming job.

--name -n

The name of the function.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az stream-analytics function test

Test if the information provided for a function is valid.

az stream-analytics function test --job-name
                                  --name
                                  --resource-group
                                  [--no-wait]

Examples

Test the connection for a function

az stream-analytics function test --resource-group MyResourceGroup --job-name MyJobName --name \
MyFunctionName

Required Parameters

--job-name

The name of the streaming job.

--name -n

The name of the function.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.