Microsoft.StreamAnalytics streamingjobs/inputs 2017-04-01-preview

Template format

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

{
  "name": "string",
  "type": "Microsoft.StreamAnalytics/streamingjobs/inputs",
  "apiVersion": "2017-04-01-preview",
  "properties": {
    "type": "string",
    "datasource": {
      "type": "string",
      "properties": {
      }
    },
    "serialization": {
      "type": "string",
      "properties": {
      }
    },
    "compression": {
      "type": "string"
    },
    "partitionKey": "string"
  }
}

Property values

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

Microsoft.StreamAnalytics/streamingjobs/inputs object

Name Type Required Value
name string Yes The name of the input.
type enum Yes inputs
-or-
Microsoft.StreamAnalytics/streamingjobs/inputs

See Set name and type for child resources.
apiVersion enum Yes 2017-04-01-preview
properties object Yes The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. - InputProperties object

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.

Serialization object

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

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.

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