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

The streamingjobs/inputs resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a Microsoft.StreamAnalytics/streamingjobs/inputs resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.StreamAnalytics/streamingjobs/inputs@2017-04-01-preview' = {
  name: 'string'
  properties: {
    compression: {
      type: 'string'
    }
    partitionKey: 'string'
    serialization: {
      type: 'string'
      // For remaining properties, see Serialization objects
    }
    type: 'string'
    // For remaining properties, see InputProperties objects
  }
}

InputProperties objects

Set the type property to specify the type of object.

For Reference, use:

  type: 'Reference'
  datasource: {
    type: 'string'
    // For remaining properties, see ReferenceInputDataSource objects
  }

For Stream, use:

  type: 'Stream'
  datasource: {
    type: 'string'
    // For remaining properties, see StreamInputDataSource objects
  }

Serialization objects

Set the type property to specify the type of object.

For Avro, use:

  type: 'Avro'
  properties: any()

For Csv, use:

  type: 'Csv'
  properties: {
    encoding: 'UTF8'
    fieldDelimiter: 'string'
  }

For CustomClr, use:

  type: 'CustomClr'
  properties: {
    serializationClassName: 'string'
    serializationDllPath: 'string'
  }

For Json, use:

  type: 'Json'
  properties: {
    encoding: 'UTF8'
    format: 'string'
  }

For Parquet, use:

  type: 'Parquet'
  properties: any()

ReferenceInputDataSource objects

Set the type property to specify the type of object.

For Microsoft.Sql/Server/Database, use:

  type: 'Microsoft.Sql/Server/Database'
  properties: {
    database: 'string'
    deltaSnapshotQuery: 'string'
    fullSnapshotQuery: 'string'
    password: 'string'
    refreshRate: 'string'
    refreshType: 'string'
    server: 'string'
    table: 'string'
    user: 'string'
  }

For Microsoft.Storage/Blob, use:

  type: 'Microsoft.Storage/Blob'
  properties: {
    container: 'string'
    dateFormat: 'string'
    pathPattern: 'string'
    storageAccounts: [
      {
        accountKey: 'string'
        accountName: 'string'
      }
    ]
    timeFormat: 'string'
  }

For Raw, use:

  type: 'Raw'
  properties: {
    payload: 'string'
    payloadUri: 'string'
  }

StreamInputDataSource objects

Set the type property to specify the type of object.

For Microsoft.Devices/IotHubs, use:

  type: 'Microsoft.Devices/IotHubs'
  properties: {
    consumerGroupName: 'string'
    endpoint: 'string'
    iotHubNamespace: 'string'
    sharedAccessPolicyKey: 'string'
    sharedAccessPolicyName: 'string'
  }

For Microsoft.EventHub/EventHub, use:

  type: 'Microsoft.EventHub/EventHub'
  properties: {
    authenticationMode: 'string'
    consumerGroupName: 'string'
    eventHubName: 'string'
    serviceBusNamespace: 'string'
    sharedAccessPolicyKey: 'string'
    sharedAccessPolicyName: 'string'
  }

For Microsoft.ServiceBus/EventHub, use:

  type: 'Microsoft.ServiceBus/EventHub'
  properties: {
    authenticationMode: 'string'
    consumerGroupName: 'string'
    eventHubName: 'string'
    serviceBusNamespace: 'string'
    sharedAccessPolicyKey: 'string'
    sharedAccessPolicyName: 'string'
  }

For Microsoft.Storage/Blob, use:

  type: 'Microsoft.Storage/Blob'
  properties: {
    container: 'string'
    dateFormat: 'string'
    pathPattern: 'string'
    sourcePartitionCount: int
    storageAccounts: [
      {
        accountKey: 'string'
        accountName: 'string'
      }
    ]
    timeFormat: 'string'
  }

For Raw, use:

  type: 'Raw'
  properties: {
    payload: 'string'
    payloadUri: 'string'
  }

Property values

streamingjobs/inputs

Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
'Microsoft.StreamAnalytics/streamingjobs/inputs'
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
'2017-04-01-preview'
name The resource name

See how to set names and types for child resources in Bicep or JSON ARM templates.
string (required)
properties The properties that are associated with an input. InputProperties

InputProperties

Name Description Value
compression Describes how input data is compressed Compression
partitionKey partitionKey Describes a key in the input data which is used for partitioning the input data string
serialization Describes how data from an input is serialized or how data is serialized when written to an output. Serialization
type Set the object type Reference
Stream

Compression

Name Description Value
type string (required)

Serialization

Name Description Value
type Set the object type Avro
Csv
CustomClr
Json
Parquet

AvroSerialization

Name Description Value
type Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. 'Avro'
properties Any object For Bicep, you can use the any() function.

CsvSerialization

Name Description Value
type Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. 'Csv'
properties The properties that are associated with the CSV serialization type. CsvSerializationProperties

CsvSerializationProperties

Name Description Value
encoding Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. 'UTF8'
fieldDelimiter Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See /rest/api/streamanalytics/stream-analytics-input or /rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required on PUT (CreateOrReplace) requests. string

CustomClrSerialization

Name Description Value
type Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. 'CustomClr'
properties The properties that are associated with the CustomClr serialization type. CustomClrSerializationProperties

CustomClrSerializationProperties

Name Description Value
serializationClassName The serialization class name. string
serializationDllPath The serialization library path. string

JsonSerialization

Name Description Value
type Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. 'Json'
properties The properties that are associated with the JSON serialization type. JsonSerializationProperties

JsonSerializationProperties

Name Description Value
encoding Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. 'UTF8'
format 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. 'Array'
'LineSeparated'

ParquetSerialization

Name Description Value
type Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. 'Parquet'
properties Any object For Bicep, you can use the any() function.

ReferenceInputProperties

Name Description Value
type Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests. 'Reference'
datasource Describes an input data source that contains reference data. ReferenceInputDataSource

ReferenceInputDataSource

Name Description Value
type Set the object type Microsoft.Sql/Server/Database
Microsoft.Storage/Blob
Raw

AzureSqlReferenceInputDataSource

Name Description Value
type Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests. 'Microsoft.Sql/Server/Database'
properties Describes Azure SQL database reference input data source properties. AzureSqlReferenceInputDataSourceProperties

AzureSqlReferenceInputDataSourceProperties

Name Description Value
database This element is associated with the datasource element. This is the name of the database that output will be written to. string
deltaSnapshotQuery 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. string
fullSnapshotQuery This element is associated with the datasource element. This query is used to fetch data from the sql database. string
password This element is associated with the datasource element. This is the password that will be used to connect to the SQL Database instance. string
refreshRate 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. string
refreshType 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 string
server This element is associated with the datasource element. This is the name of the server that contains the database that will be written to. string
table This element is associated with the datasource element. The name of the table in the Azure SQL database.. string
user This element is associated with the datasource element. This is the user name that will be used to connect to the SQL Database instance. string

BlobReferenceInputDataSource

Name Description Value
type Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests. 'Microsoft.Storage/Blob'
properties The properties that are associated with a blob input containing reference data. BlobReferenceInputDataSourceProperties

BlobReferenceInputDataSourceProperties

Name Description Value
container 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. string
dateFormat The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. string
pathPattern 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 /rest/api/streamanalytics/stream-analytics-input or /rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example. string
storageAccounts A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. StorageAccount[]
timeFormat The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. string

StorageAccount

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

RawReferenceInputDataSource

Name Description Value
type Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests. 'Raw'
properties The properties that are associated with a raw input. RawInputDatasourceProperties

RawInputDatasourceProperties

Name Description Value
payload The JSON serialized content of the input data. Either payload or payloadUri must be set, but not both. string
payloadUri The SAS URL to a blob containing the JSON serialized content of the input data. Either payload or payloadUri must be set, but not both. string

StreamInputProperties

Name Description Value
type Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests. 'Stream'
datasource Describes an input data source that contains stream data. StreamInputDataSource

StreamInputDataSource

Name Description Value
type Set the object type Microsoft.Devices/IotHubs
Microsoft.EventHub/EventHub
Microsoft.ServiceBus/EventHub
Microsoft.Storage/Blob
Raw

IoTHubStreamInputDataSource

Name Description Value
type Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. 'Microsoft.Devices/IotHubs'
properties The properties that are associated with a IoT Hub input containing stream data. IoTHubStreamInputDataSourceProperties

IoTHubStreamInputDataSourceProperties

Name Description Value
consumerGroupName 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. string
endpoint The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.). string
iotHubNamespace The name or the URI of the IoT Hub. Required on PUT (CreateOrReplace) requests. string
sharedAccessPolicyKey The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. string
sharedAccessPolicyName The shared access policy name for the IoT Hub. This policy must contain at least the Service connect permission. Required on PUT (CreateOrReplace) requests. string

EventHubV2StreamInputDataSource

Name Description Value
type Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. 'Microsoft.EventHub/EventHub'
properties The properties that are associated with a Event Hub input containing stream data. EventHubStreamInputDataSourceProperties

EventHubStreamInputDataSourceProperties

Name Description Value
authenticationMode Authentication Mode. Valid modes are ConnectionString, Msi and 'UserToken'. 'ConnectionString'
'Msi'
'UserToken'
consumerGroupName 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. string
eventHubName The name of the Event Hub. Required on PUT (CreateOrReplace) requests. string
serviceBusNamespace The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. string
sharedAccessPolicyKey The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. string
sharedAccessPolicyName The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. string

EventHubStreamInputDataSource

Name Description Value
type Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. 'Microsoft.ServiceBus/EventHub'
properties The properties that are associated with a Event Hub input containing stream data. EventHubStreamInputDataSourceProperties

BlobStreamInputDataSource

Name Description Value
type Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. 'Microsoft.Storage/Blob'
properties The properties that are associated with a blob input containing stream data. BlobStreamInputDataSourceProperties

BlobStreamInputDataSourceProperties

Name Description Value
container 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. string
dateFormat The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. string
pathPattern 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 /rest/api/streamanalytics/stream-analytics-input or /rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example. string
sourcePartitionCount The partition count of the blob input data source. Range 1 - 256. int
storageAccounts A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. StorageAccount[]
timeFormat The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. string

RawStreamInputDataSource

Name Description Value
type Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. 'Raw'
properties The properties that are associated with a raw input. RawInputDatasourceProperties