Microsoft.StreamAnalytics streamingjobs 2017-04-01-preview

Template format

To create a Microsoft.StreamAnalytics/streamingjobs resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.StreamAnalytics/streamingjobs",
  "apiVersion": "2017-04-01-preview",
  "tags": {},
  "location": "string",
  "properties": {
    "sku": {
      "name": "Standard"
    },
    "jobType": "string",
    "outputStartMode": "string",
    "outputStartTime": "string",
    "eventsOutOfOrderPolicy": "string",
    "outputErrorPolicy": "string",
    "eventsOutOfOrderMaxDelayInSeconds": "integer",
    "eventsLateArrivalMaxDelayInSeconds": "integer",
    "dataLocale": "string",
    "compatibilityLevel": "1.0",
    "inputs": [
      {
        "name": "string",
        "properties": {
          "type": "string",
          "datasource": {
            "type": "string",
            "properties": {
            }
          },
          "serialization": {
            "type": "string",
            "properties": {
            }
          },
          "compression": {
            "type": "string"
          },
          "partitionKey": "string"
        }
      }
    ],
    "transformation": {
      "name": "string",
      "properties": {
        "streamingUnits": "integer",
        "query": "string"
      }
    },
    "outputs": [
      {
        "name": "string",
        "properties": {
          "datasource": {
            "type": "string",
            "properties": {
            }
          },
          "timeWindow": "string",
          "sizeWindow": "number",
          "serialization": {
            "type": "string",
            "properties": {
            }
          }
        }
      }
    ],
    "functions": [
      {
        "name": "string",
        "properties": {
          "type": "string",
          "properties": {
            "inputs": [
              {
                "dataType": "string",
                "isConfigurationParameter": "boolean"
              }
            ],
            "output": {
              "dataType": "string"
            },
            "binding": {
              "type": "string",
              "properties": {
              }
            }
          }
        }
      }
    ],
    "jobStorageAccount": {
      "accountName": "string",
      "accountKey": "string",
      "authenticationMode": "string"
    },
    "externals": {
      "storageAccount": {
        "accountName": "string",
        "accountKey": "string"
      },
      "container": "string",
      "path": "string"
    },
    "cluster": {
      "id": "string"
    }
  },
  "identity": {
    "tenantId": "string",
    "principalId": "string",
    "type": "string"
  }
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.StreamAnalytics/streamingjobs object

Name Type Required Value
name string Yes The name of the streaming job.
type enum Yes Microsoft.StreamAnalytics/streamingjobs
apiVersion enum Yes 2017-04-01-preview
tags object No Resource tags.
location string No The geo-location where the resource lives
properties object Yes The properties that are associated with a streaming job. Required on PUT (CreateOrReplace) requests. - StreamingJobProperties object
identity object No Describes the system-assigned managed identity assigned to this job that can be used to authenticate with inputs and outputs. - Identity object

StreamingJobProperties object

Name Type Required Value
sku object No Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests. - StreamingJobSku object
jobType enum No Describes the type of the job. Valid modes are Cloud and 'Edge'. - Cloud or Edge
outputStartMode enum No This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time. - JobStartTime, CustomTime, LastOutputEventTime
outputStartTime string No Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. This property must have a value if outputStartMode is set to CustomTime.
eventsOutOfOrderPolicy enum No Indicates the policy to apply to events that arrive out of order in the input event stream. - Adjust or Drop
outputErrorPolicy enum No Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size). - Stop or Drop
eventsOutOfOrderMaxDelayInSeconds integer No The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order.
eventsLateArrivalMaxDelayInSeconds integer No The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a value of -1.
dataLocale string No The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if none specified.
compatibilityLevel enum No Controls certain runtime behaviors of the streaming job. - 1.0
inputs array No A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual input. - Input object
transformation object No Indicates the query and the number of streaming units to use for the streaming job. The name property of the transformation is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation. - Transformation object
outputs array No A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output. - Output object
functions array No A list of one or more functions for the streaming job. The name property for each function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation. - Function object
jobStorageAccount object No JobStorageAccount object
externals object No The storage account where the custom code artifacts are located. - External object
cluster object No The cluster which streaming jobs will run on. - ClusterInfo object

Identity object

Name Type Required Value
tenantId string No
principalId string No
type string No

StreamingJobSku object

Name Type Required Value
name enum No The name of the SKU. Required on PUT (CreateOrReplace) requests. - Standard

Input object

Name Type Required Value
name string No Resource name
properties object No The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. - InputProperties object

Transformation object

Name Type Required Value
name string No Resource name
properties object No The properties that are associated with a transformation. Required on PUT (CreateOrReplace) requests. - TransformationProperties object

Output object

Name Type Required Value
name string No Resource name
properties object No The properties that are associated with an output. Required on PUT (CreateOrReplace) requests. - OutputProperties object

Function object

Name Type Required Value
name string No Resource name
properties object No The properties that are associated with a function. - FunctionProperties object

JobStorageAccount object

Name Type Required Value
accountName string No The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.
accountKey string No The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.
authenticationMode enum No Authentication Mode. - Msi, UserToken, ConnectionString

External object

Name Type Required Value
storageAccount object No StorageAccount object
container string No
path string No

ClusterInfo object

Name Type Required Value
id string No The resource id of cluster.

InputProperties object

Name Type Required Value
type string Yes Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests. - Stream or Reference
datasource object No StreamInputDataSource or ReferenceInputDataSource
serialization object No Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Serialization object
compression object No Compression object
partitionKey string No partitionKey Describes a key in the input data which is used for partitioning the input data

StreamInputDataSource

Name Type Required Value
type enum No Microsoft.Storage/Blob, Microsoft.ServiceBus/EventHub, Microsoft.Devices/IotHubs
properties object No The properties associated with the object. See StreamInputDataSourceProperties.

ReferenceInputDataSource

Name Type Required Value
type enum No Microsoft.Storage/Blob
properties object No The properties associated with the object. See ReferenceInputDataSourceProperties.

StreamInputDataSourceProperties

The values you provide for the properties vary by object type. The available types are:

Microsoft.Storage/Blob

"datasource": {
    "type": "Microsoft.Storage/Blob",
    "properties": {
        "storageAccounts": [
            {
                "accountName": "string",
                "accountKey": "string"    
            }
        ],
        "container": "string",
        "pathPattern": "string",
        "dateFormat": "string",
        "timeFormat": "string",
        "sourcePartitionCount": integer
    }
}
Name Type Required Value
storageAccounts array No A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests - storageAccounts
container string No The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.
pathPattern string No The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.
dateFormat string No The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.
timeFormat string No The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.
sourcePartitionCount integer No The partition count of the blob input data source. Range 1 - 256.

storageAccounts

Name Type Required Value
accountName string No The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.
accountKey string No The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.

Microsoft.ServiceBus/EventHub

"datasource": {
    "type": "Microsoft.ServiceBus/EventHub",
    "properties": {
        "serviceBusNamespace": "string",
        "sharedAccessPolicyName": "string",
        "sharedAccessPolicyKey": "string",
        "eventHubName": "string",
        "consumerGroupName": "string",
        "authenticationMode": "string"
    }
}
Name Type Required Value
serviceBusNamespace string No The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.
sharedAccessPolicyName string No The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.
sharedAccessPolicyKey string No The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.
eventHubName string No The name of the Event Hub. Required on PUT (CreateOrReplace) requests.
consumerGroupName string No The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, the input uses the Event Hub’s default consumer group.
authenticationMode string No Authentication Mode. Valid modes are ConnectionString, Msi and 'UserToken'.

Microsoft.Devices/IotHubs

"datasource": {
    "type": "Microsoft.Devices/IotHubs",
    "properties": {
        "iotHubNamespace": "string",
        "sharedAccessPolicyName": "string",
        "sharedAccessPolicyKey": "string",
        "consumerGroupName": "string",
        "endpoint": "string"
    }
}
Name Type Required Value
iotHubNamespace string No The name or the URI of the IoT Hub. Required on PUT (CreateOrReplace) requests.
sharedAccessPolicyName string No The shared access policy name for the IoT Hub. This policy must contain at least the Service connect permission. Required on PUT (CreateOrReplace) requests.
sharedAccessPolicyKey string No The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.
consumerGroupName string No The name of an IoT Hub Consumer Group that should be used to read events from the IoT Hub. If not specified, the input uses the Iot Hub's default consumer group.
endpoint string No The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.).

ReferenceInputDataSourceProperties

The values you provide for the properties vary by object type. The available types are:

Microsoft.Storage/Blob

"datasource": {
    "type": "Microsoft.Storage/Blob",
    "properties": {
        "storageAccounts": [
            {
                "accountName": "string",
                "accountKey": "string"    
            }
        ],
        "container": "string",
        "pathPattern": "string",
        "dateFormat": "string",
        "timeFormat": "string"
    }
}
Name Type Required Value
storageAccounts array No A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests - storageAccounts
container string No The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.
pathPattern string No The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.
dateFormat string No The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.
timeFormat string No The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.

storageAccounts

Name Type Required Value
accountName string No The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.
accountKey string No The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.

Microsoft.Sql/Server/Database

"datasource": {
    "type": "Microsoft.Sql/Server/Database",
    "properties": {
      "server": "string",
      "database": "string",
      "user": "string",
      "password": "string",
      "table": "string",
      "refreshType": "string",
      "refreshRate": "string",
      "fullSnapshotQuery": "string",
      "deltaSnapshotQuery": "string"
    }
}
Name Type Required Value
server string No This element is associated with the datasource element. This is the name of the server that contains the database that will be written to.
database string No This element is associated with the datasource element. This is the name of the database that output will be written to.
user string No This element is associated with the datasource element. This is the user name that will be used to connect to the SQL Database instance.
password string No This element is associated with the datasource element. This is the password that will be used to connect to the SQL Database instance.
table string No This element is associated with the datasource element. The name of the table in the Azure SQL database.
refreshType string No This element is associated with the datasource element. This element is of enum type. It indicates what kind of data refresh option do we want to use:Static/RefreshPeriodicallyWithFull/RefreshPeriodicallyWithDelta
refreshRate string No This element is associated with the datasource element. This indicates how frequently the data will be fetched from the database. It is of DateTime format.
fullSnapshotQuery string No This element is associated with the datasource element. This query is used to fetch data from the sql database.
deltaSnapshotQuery string No This element is associated with the datasource element. This query is used to fetch incremental changes from the SQL database. To use this option, we recommend using temporal tables in Azure SQL Database.

TransformationProperties object

Name Type Required Value
streamingUnits integer No Specifies the number of streaming units that the streaming job uses.
query string No Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.

OutputProperties object

Name Type Required Value
datasource object No Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. - OutputDataSource object
timeWindow string No
sizeWindow number No
serialization object No Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Serialization object

FunctionProperties object

Name Type Required Value
type string Yes Indicates the type of function.
properties object No FunctionConfiguration object

StorageAccount object

Name Type Required Value
accountName string No The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.
accountKey string No The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.

Serialization object

Name Type Required Value
type enum No Avro, Csv, CustomClr, Json, Parquet
properties object No The properties associated with the object. - SerializationProperties

SerializationProperties

The values you provide for the properties vary by object type. The available types are:

Avro

"serialization": {
    "type": "Avro",
    "properties": {
        "encoding": "UTF8"
    }
}
Name Type Required Value
encoding enum No Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests. - UTF8

Csv

"serialization": {
    "type": "Csv",
    "properties": {
        "fieldDelimiter": "string",
        "encoding": "UTF8"
    }
}
Name Type Required Value
fieldDelimiter string No Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required on PUT (CreateOrReplace) requests.
encoding enum No Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests. - UTF8

CustomClr

"serialization": {
    "type": "CustomClr",
    "properties": {
        "serializationDllPath": "string",
        "serializationClassName": "string"
    }
}
Name Type Required Value
serializationDllPath string No The serialization library path.
serializationClassName string No The serialization class name.

Json

"serialization": {
    "type": "Json",
    "properties": {
        "encoding": "UTF8",
        "format": "string"
    }
}
Name Type Required Value
encoding enum No Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests. - UTF8
format enum No Specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be formatted as an array of JSON objects - LineSeparated, Array

Parquet

"serialization": {
    "type": "Parquet",
    "properties": {
    }
}

Compression object

Name Type Required Value
type string Yes Describes how input data is compressed - None, GZip, Deflate

OutputDataSource object

Name Type Required Value
type enum No Microsoft.Storage/Blob, Microsoft.Storage/Table, Microsoft.ServiceBus/EventHub, Microsoft.Sql/Server/Database, Microsoft.Storage/DocumentDB, Microsoft.ServiceBus/Queue, Microsoft.ServiceBus/Topic, PowerBI, Microsoft.DataLake/Accounts
properties object No The properties associated with the object. - OutputDataSourceProperties

OutputDataSourceProperties

The values you provide for the properties vary by object type. The available types are:

Microsoft.DataLake/Accounts

"datasource": {
    "type": "Microsoft.DataLake/Accounts",
    "properties": {
        "refreshToken": "string",
        "tokenUserPrincipalName": "string",
        "tokenUserDisplayName": "string",
        "accountName": "string",
        "tenantId": "string",
        "filePathPrefix": "string",
        "dateFormat": "string",
        "timeFormat": "string",
        "authenticationMode": "string"
    }
}
Name Type Required Value
refreshToken string No A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.
tokenUserPrincipalName string No The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.
tokenUserDisplayName string No The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.
accountName string No The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests.
tenantId string No The tenant id of the user used to obtain the refresh token. Required on PUT (CreateOrReplace) requests.
filePathPrefix string No The location of the file to which the output should be written to. Required on PUT (CreateOrReplace) requests.
dateFormat string No The date format. Wherever {date} appears in filePathPrefix, the value of this property is used as the date format instead.
timeFormat string No The time format. Wherever {time} appears in filePathPrefix, the value of this property is used as the time format instead.
authenticationMode string No The authentication Mode. Possible values include: Msi, UserToken, ConnectionString

Microsoft.ServiceBus/EventHub

"datasource": {
    "type": "Microsoft.ServiceBus/EventHub",
    "properties": {
        "serviceBusNamespace": "string",
        "sharedAccessPolicyName": "string",
        "sharedAccessPolicyKey": "string",
        "authenticationMode": "string",
        "eventHubName": "string",
        "partitionKey": "string",
        "propertyColumns": [ "string" ]
    }
}
Name Type Required Value
serviceBusNamespace string No The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.
sharedAccessPolicyName string No The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.
sharedAccessPolicyKey string No The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.
authenticationMode string No The authentication Mode. Possible values include: Msi, UserToken, ConnectionString
eventHubName string No The name of the Event Hub. Required on PUT (CreateOrReplace) requests.
partitionKey string No The key/column that is used to determine to which partition to send event data.
propertyColumns array No A string array of the names of output columns to be attached to Service Bus messages as custom properties.

Microsoft.ServiceBus/Queue

"datasource": {
    "type": "Microsoft.ServiceBus/Queue",
    "properties": {
        "serviceBusNamespace": "string",
        "sharedAccessPolicyName": "string",
        "sharedAccessPolicyKey": "string",
        "authenticationMode": "string",
        "queueName": "string",
        "propertyColumns": [ "string" ],
        "systemPropertyColumns": {
        }
    }
}
Name Type Required Value
serviceBusNamespace string No The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc.
sharedAccessPolicyName string No The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc.
sharedAccessPolicyKey string No The shared access policy key for the specified shared access policy.
authenticationMode string No The authentication Mode. Possible values include: Msi, UserToken, ConnectionString
queueName string No The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests.
propertyColumns array No A string array of the names of output columns to be attached to Service Bus messages as custom properties. - string
systemPropertyColumns object No

Microsoft.ServiceBus/Topic

"datasource": {
    "type": "Microsoft.ServiceBus/Topic",
    "properties": {
        "serviceBusNamespace": "string",
        "sharedAccessPolicyName": "string",
        "sharedAccessPolicyKey": "string",
        "authenticationMode": "string",
        "topicName": "string",
        "propertyColumns": [ "string" ],
        "systemPropertyColumns": {
        }
    }
}
Name Type Required Value
serviceBusNamespace string No The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.
sharedAccessPolicyName string No The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.
sharedAccessPolicyKey string No The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.
authenticationMode string No The authentication Mode. Possible values include: Msi, UserToken, ConnectionString
topicName string No The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests.
propertyColumns array No A string array of the names of output columns to be attached to Service Bus messages as custom properties. - string
systemPropertyColumns object No

Microsoft.Storage/Blob

"datasource": {
    "type": "Microsoft.Storage/Blob",
    "properties": {
        "storageAccounts": [
            {
                "accountName": "string",
                "accountKey": "string"
            }
        ],
        "container": "string",
        "pathPattern": "string",
        "dateFormat": "string",
        "timeFormat": "string",
        "authenticationMode": "string"
    }
}
Name Type Required Value
storageAccounts array No A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests - storageAccounts
container string No The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.
pathPattern string No The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.
dateFormat string No The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.
timeFormat string No The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.
authenticationMode string No The authentication Mode. Possible values include: Msi, UserToken, ConnectionString

storageAccounts

Name Type Required Value
accountName string No The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.
accountKey string No The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.

Microsoft.Storage/DocumentDB

"datasource": {
    "type": "Microsoft.Storage/DocumentDB",
    "properties": {
        "accountId": "string",
        "accountKey": "string",
        "database": "string",
        "collectionNamePattern": "string",
        "partitionKey": "string",
        "documentId": "string"
    }
}
Name Type Required Value
accountId string No The Azure Cosmos DB account name or ID. Required on PUT (CreateOrReplace) requests.
accountKey string No The account key for the Azure Cosmos DB account. Required on PUT (CreateOrReplace) requests.
database string No The name of the Azure Cosmos DB database. Required on PUT (CreateOrReplace) requests.
collectionNamePattern string No The collection name pattern for the collections to be used. The collection name format can be constructed using the optional {partition} token, where partitions start from 0. See the Azure Cosmos DB section of https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-output for more information. Required on PUT (CreateOrReplace) requests.
partitionKey string No The name of the field in output events used to specify the key for partitioning output across collections. If 'collectionNamePattern' contains the {partition} token, this property is required to be specified.
documentId string No The name of the field in output events used to specify the primary key which insert or update operations are based on.

Microsoft.Storage/Table

"datasource": {
    "type": "Microsoft.Storage/Table",
    "properties": {
        "accountName": "string",
        "accountKey": "string",
        "table": "string",
        "partitionKey": "string",
        "rowKey": "string",
        "columnsToRemove": [
            "string"
        ],
        "batchSize": integer
    }
}
Name Type Required Value
accountName string No The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.
accountKey string No The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.
table string No The name of the Azure Table. Required on PUT (CreateOrReplace) requests.
partitionKey string No This element indicates the name of a column from the SELECT statement in the query that will be used as the partition key for the Azure Table. Required on PUT (CreateOrReplace) requests.
rowKey string No This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for the Azure Table. Required on PUT (CreateOrReplace) requests.
columnsToRemove array No If specified, each item in the array is the name of a column to remove (if present) from output event entities. - string
batchSize integer No The number of rows to write to the Azure Table at a time.

Microsoft.Sql/Server/Database

"datasource": {
    "type": "Microsoft.Sql/Server/Database",
    "properties": {
        "server": "string",
        "database": "string",
        "user": "string",
        "password": "string",
        "table": "string",
        "maxBatchCount": integer,
        "maxWriterCount": integer,
        "authenticationMode": "string"
    }
}
Name Type Required Value
server string No The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.
database string No The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.
user string No The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.
password string No The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.
table string No The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.
maxBatchCount integer No The max Batch count for write to Sql database, the default value is 10,000.
maxWriterCount integer No max Writer count, currently only 1 (single writer) and 0 (based on query partition) are available.
authenticationMode string No The authentication Mode. Possible values include: Msi, UserToken, ConnectionString

Microsoft.Sql/Server/DataWarehouse

"datasource": {
    "type": "Microsoft.Sql/Server/DataWarehouse",
    "properties": {
        "server": "string",
        "database": "string",
        "table": "string",
        "user": "string",
        "password": "string"
    }
}
Name Type Required Value
server string No The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.
database string No The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.
table string No The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.
user string No The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.
password string No The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.

PowerBI

"datasource": {
    "type": "PowerBI",
    "properties": {
        "refreshToken": "string",
        "tokenUserPrincipalName": "string",
        "tokenUserDisplayName": "string",
        "dataset": "string",
        "table": "string",
        "groupId": "string",
        "groupName": "string",
        "authenticationMode": "string"
    }
}
Name Type Required Value
refreshToken string No A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.
tokenUserPrincipalName string No The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.
tokenUserDisplayName string No The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.
dataset string No The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests.
table string No The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests.
groupId string No The ID of the Power BI group.
groupName string No The name of the Power BI group. Use this property to help remember which specific Power BI group id was used.
authenticationMode string No The authentication Mode. Possible values include: Msi, UserToken, ConnectionString

Microsoft.AzureFunction

"datasource": {
    "type": "Microsoft.AzureFunction",
    "properties": {
        "functionAppName": "string",
        "functionName": "string",
        "apiKey": "string",
        "maxBatchSize": "string",
        "maxBatchCount": "string"
    }
}
Name Type Required Value
functionAppName string No Name of the user's Azure Functions app. Required on PUT (CreateOrReplace) requests.
functionName string No Name of the function in the user's Azure Functions app.Required on PUT (CreateOrReplace) requests.
apiKey string No API key of the users Azure function. Set value to this property in order to get access to desired Azure Function. Required on PUT (CreateOrReplace) requests.
maxBatchSize string No Use this property to set the maximum size for each output batch that is sent to the user's function. By default, this value is set to 256 KB.
maxBatchCount string No Use this property to set the maximum number of events in each batch that is sent to the user's function. The default value is 100.

FunctionConfiguration object

Name Type Required Value
inputs array No FunctionInput object
output object No FunctionOutput object
binding object No FunctionBinding object

FunctionInput object

Name Type Required Value
dataType string No The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/library/azure/dn835065.aspx
isConfigurationParameter boolean No A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false.

FunctionOutput object

Name Type Required Value
dataType string No The (Azure Stream Analytics supported) data type of the function output. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/library/azure/dn835065.aspx

FunctionBinding object

Name Type Required Value
type string Yes Microsoft.MachineLearning/WebService, Microsoft.StreamAnalytics/JavascriptUdf, Microsoft.MachineLearningServices, or Microsoft.StreamAnalytics/CLRUdf
properties object No The properties associated with the object. - FunctionBindingProperties

FunctionBindingProperties

The values you provide for the properties vary by object type. The available types are:

Microsoft.MachineLearning/WebService

"binding": {  
    "type": "Microsoft.MachineLearning/WebService",  
    "properties": {  
        "endpoint": "string",  
        "apiKey": "string",  
        "inputs": {  
            "name": "string",  
            "columnNames": [  
                {  
                    "name": "string",  
                    "dataType": boolean,  
                    "mapTo": integer  
                }  
            ]  
        },  
        "outputs": [  
            {  
                "name": "string",  
                "dataType": "string",
                "mapTo": integer 
            }  
        ],  
        "batchSize": integer
    }  
}  
Name Type Required Value
endpoint string No The Request-Response execute endpoint of the Azure Machine Learning web service. Find out more here: https://docs.microsoft.com/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs
apiKey string No The API key used to authenticate with Request-Response endpoint.
inputs object No The inputs for the Azure Machine Learning web service endpoint. - AzureMachineLearningWebServiceInputs
outputs array No A list of outputs from the Azure Machine Learning web service endpoint execution. - AzureMachineLearningWebServiceOutputColumn
batchSize integer No Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000.

AzureMachineLearningWebServiceInputs

Name Type Required Value
name string No The name of the input. This is the name provided while authoring the endpoint.
columnNames array No A list of input columns for the Azure Machine Learning web service endpoint. - AzureMachineLearningWebServiceInputColumn

AzureMachineLearningWebServiceInputColumn

Name Type Required Value
name string No The name of the input column.
dataType string No The (Azure Machine Learning supported) data type of the input column. A list of valid Azure Machine Learning data types are described at https://msdn.microsoft.com/library/azure/dn905923.aspx.
mapTo integer No The zero based index of the function parameter this input maps to.

AzureMachineLearningWebServiceOutputColumn

Name Type Required Value
name string No The name of the output column.
dataType string No The (Azure Machine Learning supported) data type of the output column. A list of valid Azure Machine Learning data types are described at https://msdn.microsoft.com/library/azure/dn905923.aspx.
mapTo integer No The zero based index of the function parameter this input maps to.

Microsoft.MachineLearningServices

"binding": {  
    "type": "Microsoft.MachineLearningServices",  
    "properties": {  
        "endpoint": "string",  
        "apiKey": "string",  
        "inputs": {  
            "name": "string",  
            "columnNames": [  
                {  
                    "name": "string",  
                    "dataType": boolean,  
                    "mapTo": integer  
                }  
            ]  
        },  
        "outputs": [  
            {  
                "name": "string",  
                "dataType": "string",
                "mapTo": integer 
            }  
        ],  
        "batchSize": integer,
        "numberOfParallelRequests": integer
    }  
}  
Name Type Required Value
endpoint string No The Request-Response execute endpoint of the Azure Machine Learning web service.
apiKey string No The API key used to authenticate with Request-Response endpoint.
inputs object No The inputs for the Azure Machine Learning web service endpoint. - AzureMachineLearningWebServiceInputs
outputs array No A list of outputs from the Azure Machine Learning web service endpoint execution. - AzureMachineLearningWebServiceOutputColumn
batchSize integer No Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000.
numberOfParallelRequests integer No The number of parallel requests that will be sent per partition of your job to the machine learning service. Default is 1.

Microsoft.StreamAnalytics/CLRUdf

"binding": {  
    "type": "Microsoft.StreamAnalytics/CLRUdf",  
    "properties": {  
        "scripts": "string",
        "dllPath": "string",
        "class": "string",
        "method": "string"
    }  
}  
Name Type Required Value
script string No The Csharp code containing a single function definition.
dllPath string No The Csharp code containing a single function definition.
class string No The Csharp code containing a single function definition.
method string No The Csharp code containing a single function definition.

Microsoft.StreamAnalytics/JavascriptUdf

"binding": {  
    "type": "Microsoft.StreamAnalytics/JavascriptUdf",  
    "properties": {  
        "scripts": "string"
    }  
}  
Name Type Required Value
script string No The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }'

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create a Standard Stream Analytics Job

Deploy to Azure
This template creates a Standard Stream Analytics Job without input and output