Outputs - Test
Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test?api-version=2020-03-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
job
|
path | True |
string |
The name of the streaming job. |
output
|
path | True |
string |
The name of the output. |
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. Regex pattern: |
subscription
|
path | True |
string |
The ID of the target subscription. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Request Body
Name | Type | Description |
---|---|---|
name |
string |
Resource name |
properties.datasource |
OutputDataSource:
|
Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. |
properties.serialization | Serialization: |
Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. |
properties.sizeWindow |
integer |
The size window to constrain a Stream Analytics output to. |
properties.timeWindow |
string |
The time frame for filtering Stream Analytics job outputs. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The test operation completed successfully. |
|
202 Accepted |
The test request was successfully initiated. |
|
Other Status Codes |
Error. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Test the connection for an output
Sample request
POST https://management.azure.com/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourcegroups/sjrg2157/providers/Microsoft.StreamAnalytics/streamingjobs/sj6458/outputs/output1755/test?api-version=2020-03-01
Sample response
{
"status": "TestSucceeded"
}
Definitions
Name | Description |
---|---|
Authentication |
Authentication Mode. Valid modes are |
Avro |
Describes how data from an input is serialized or how data is serialized when written to an output in Avro format. |
Azure |
Describes an Azure Data Lake Store output data source. |
Azure |
Defines the metadata of AzureFunctionOutputDataSource |
Azure |
Describes an Azure SQL database output data source. |
Azure |
Describes an Azure Synapse output data source. |
Azure |
Describes an Azure Table output data source. |
Blob |
Describes a blob output data source. |
Csv |
Describes how data from an input is serialized or how data is serialized when written to an output in CSV format. |
Diagnostic |
Condition applicable to the resource, or to the job overall, that warrant customer attention. |
Diagnostics |
Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. |
Document |
Describes a DocumentDB output data source. |
Encoding |
Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. |
Error |
Common error representation. |
Error |
Describes the error that occurred. |
Event |
Describes an Event Hub output data source. |
Event |
Describes an Event Hub output data source. |
Event |
Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. |
Gateway |
Describes a Gateway Message Bus output data source. |
Json |
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. |
Json |
Describes how data from an input is serialized or how data is serialized when written to an output in JSON format. |
Output |
An output object, containing all information associated with the named output. All outputs are contained under a streaming job. |
Parquet |
Describes how data from an input is serialized or how data is serialized when written to an output in Parquet format. |
Power |
Describes a Power BI output data source. |
Resource |
Describes the status of the test operation along with error information, if applicable. |
Service |
Describes a Service Bus Queue output data source. |
Service |
Describes a Service Bus Topic output data source. |
Storage |
The properties that are associated with an Azure Storage account |
AuthenticationMode
Authentication Mode. Valid modes are ConnectionString
, Msi
and 'UserToken'.
Name | Type | Description |
---|---|---|
ConnectionString |
string |
|
Msi |
string |
|
UserToken |
string |
AvroSerialization
Describes how data from an input is serialized or how data is serialized when written to an output in Avro format.
Name | Type | Description |
---|---|---|
type |
string:
Avro |
Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. |
AzureDataLakeStoreOutputDataSource
Describes an Azure Data Lake Store output data source.
Name | Type | Default value | Description |
---|---|---|---|
properties.accountName |
string |
The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests. |
|
properties.authenticationMode | ConnectionString |
Authentication Mode. |
|
properties.dateFormat |
string |
The date format. Wherever {date} appears in filePathPrefix, the value of this property is used as the date format instead. |
|
properties.filePathPrefix |
string |
The location of the file to which the output should be written to. Required on PUT (CreateOrReplace) requests. |
|
properties.refreshToken |
string |
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. |
|
properties.tenantId |
string |
The tenant id of the user used to obtain the refresh token. Required on PUT (CreateOrReplace) requests. |
|
properties.timeFormat |
string |
The time format. Wherever {time} appears in filePathPrefix, the value of this property is used as the time format instead. |
|
properties.tokenUserDisplayName |
string |
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. |
|
properties.tokenUserPrincipalName |
string |
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. |
|
type |
string:
Microsoft. |
Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. |
AzureFunctionOutputDataSource
Defines the metadata of AzureFunctionOutputDataSource
Name | Type | Description |
---|---|---|
properties.apiKey |
string |
If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function. |
properties.functionAppName |
string |
The name of your Azure Functions app. |
properties.functionName |
string |
The name of the function in your Azure Functions app. |
properties.maxBatchCount |
number |
A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default value is 100. |
properties.maxBatchSize |
number |
A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit is in bytes. By default, this value is 262,144 bytes (256 KB). |
type |
string:
Microsoft. |
Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. |
AzureSqlDatabaseOutputDataSource
Describes an Azure SQL database output data source.
Name | Type | Default value | Description |
---|---|---|---|
properties.authenticationMode | ConnectionString |
Authentication Mode. |
|
properties.database |
string |
The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. |
|
properties.maxBatchCount |
number |
Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests. |
|
properties.maxWriterCount |
number |
Max Writer count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests. |
|
properties.password |
string |
The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. |
|
properties.server |
string |
The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. |
|
properties.table |
string |
The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests. |
|
properties.user |
string |
The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. |
|
type |
string:
Microsoft. |
Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. |
AzureSynapseOutputDataSource
Describes an Azure Synapse output data source.
Name | Type | Description |
---|---|---|
properties.database |
string |
The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. |
properties.password |
string |
The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. |
properties.server |
string |
The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. |
properties.table |
string |
The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests. |
properties.user |
string |
The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. |
type |
string:
Microsoft. |
Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. |
AzureTableOutputDataSource
Describes an Azure Table output data source.
Name | Type | Description |
---|---|---|
properties.accountKey |
string |
The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. |
properties.accountName |
string |
The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. |
properties.batchSize |
integer |
The number of rows to write to the Azure Table at a time. |
properties.columnsToRemove |
string[] |
If specified, each item in the array is the name of a column to remove (if present) from output event entities. |
properties.partitionKey |
string |
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. |
properties.rowKey |
string |
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. |
properties.table |
string |
The name of the Azure Table. Required on PUT (CreateOrReplace) requests. |
type |
string:
Microsoft. |
Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. |
BlobOutputDataSource
Describes a blob output data source.
Name | Type | Default value | Description |
---|---|---|---|
properties.authenticationMode | ConnectionString |
Authentication Mode. |
|
properties.blobPathPrefix |
string |
Blob path prefix. |
|
properties.container |
string |
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. |
|
properties.dateFormat |
string |
The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. |
|
properties.pathPattern |
string |
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/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example. |
|
properties.storageAccounts |
A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. |
||
properties.timeFormat |
string |
The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. |
|
type |
string:
Microsoft. |
Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. |
CsvSerialization
Describes how data from an input is serialized or how data is serialized when written to an output in CSV format.
Name | Type | Description |
---|---|---|
properties.encoding |
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. |
|
properties.fieldDelimiter |
string |
Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required on PUT (CreateOrReplace) requests. |
type |
string:
Csv |
Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. |
DiagnosticCondition
Condition applicable to the resource, or to the job overall, that warrant customer attention.
Name | Type | Description |
---|---|---|
code |
string |
The opaque diagnostic code. |
message |
string |
The human-readable message describing the condition in detail. Localized in the Accept-Language of the client request. |
since |
string |
The UTC timestamp of when the condition started. Customers should be able to find a corresponding event in the ops log around this time. |
Diagnostics
Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention.
Name | Type | Description |
---|---|---|
conditions |
A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. |
DocumentDbOutputDataSource
Describes a DocumentDB output data source.
Name | Type | Description |
---|---|---|
properties.accountId |
string |
The DocumentDB account name or ID. Required on PUT (CreateOrReplace) requests. |
properties.accountKey |
string |
The account key for the DocumentDB account. Required on PUT (CreateOrReplace) requests. |
properties.collectionNamePattern |
string |
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 DocumentDB section of https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for more information. Required on PUT (CreateOrReplace) requests. |
properties.database |
string |
The name of the DocumentDB database. Required on PUT (CreateOrReplace) requests. |
properties.documentId |
string |
The name of the field in output events used to specify the primary key which insert or update operations are based on. |
properties.partitionKey |
string |
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. |
type |
string:
Microsoft. |
Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. |
Encoding
Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output.
Name | Type | Description |
---|---|---|
UTF8 |
string |
Error
Common error representation.
Name | Type | Description |
---|---|---|
error |
Error definition properties. |
ErrorResponse
Describes the error that occurred.
Name | Type | Description |
---|---|---|
code |
string |
Error code associated with the error that occurred. |
message |
string |
Describes the error in detail. |
EventHubOutputDataSource
Describes an Event Hub output data source.
Name | Type | Default value | Description |
---|---|---|---|
authenticationMode | ConnectionString |
Authentication Mode. |
|
properties.eventHubName |
string |
The name of the Event Hub. Required on PUT (CreateOrReplace) requests. |
|
properties.partitionKey |
string |
The key/column that is used to determine to which partition to send event data. |
|
properties.propertyColumns |
string[] |
The properties associated with this Event Hub output. |
|
serviceBusNamespace |
string |
The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. |
|
sharedAccessPolicyKey |
string |
The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. |
|
sharedAccessPolicyName |
string |
The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. |
|
type |
string:
Microsoft. |
Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. |
EventHubV2OutputDataSource
Describes an Event Hub output data source.
Name | Type | Default value | Description |
---|---|---|---|
authenticationMode | ConnectionString |
Authentication Mode. |
|
properties.eventHubName |
string |
The name of the Event Hub. Required on PUT (CreateOrReplace) requests. |
|
properties.partitionKey |
string |
The key/column that is used to determine to which partition to send event data. |
|
properties.propertyColumns |
string[] |
The properties associated with this Event Hub output. |
|
serviceBusNamespace |
string |
The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. |
|
sharedAccessPolicyKey |
string |
The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. |
|
sharedAccessPolicyName |
string |
The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. |
|
type |
string:
Microsoft. |
Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. |
EventSerializationType
Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.
Name | Type | Description |
---|---|---|
Avro |
string |
|
Csv |
string |
|
Json |
string |
|
Parquet |
string |
GatewayMessageBusOutputDataSource
Describes a Gateway Message Bus output data source.
Name | Type | Description |
---|---|---|
properties.topic |
string |
The name of the Service Bus topic. |
type |
string:
Gateway |
Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. |
JsonOutputSerializationFormat
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.
Name | Type | Description |
---|---|---|
Array |
string |
|
LineSeparated |
string |
JsonSerialization
Describes how data from an input is serialized or how data is serialized when written to an output in JSON format.
Name | Type | Description |
---|---|---|
properties.encoding |
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. |
|
properties.format |
This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property 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. Default value is 'lineSeparated' if left null. |
|
type |
string:
Json |
Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. |
Output
An output object, containing all information associated with the named output. All outputs are contained under a streaming job.
Name | Type | Description |
---|---|---|
id |
string |
Resource Id |
name |
string |
Resource name |
properties.datasource |
OutputDataSource:
|
Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. |
properties.diagnostics |
Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. |
|
properties.etag |
string |
The current entity tag for the output. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency. |
properties.serialization | Serialization: |
Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. |
properties.sizeWindow |
integer |
The size window to constrain a Stream Analytics output to. |
properties.timeWindow |
string |
The time frame for filtering Stream Analytics job outputs. |
type |
string |
Resource type |
ParquetSerialization
Describes how data from an input is serialized or how data is serialized when written to an output in Parquet format.
Name | Type | Description |
---|---|---|
type |
string:
Parquet |
Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. |
PowerBIOutputDataSource
Describes a Power BI output data source.
Name | Type | Default value | Description |
---|---|---|---|
properties.authenticationMode | ConnectionString |
Authentication Mode. |
|
properties.dataset |
string |
The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests. |
|
properties.groupId |
string |
The ID of the Power BI group. |
|
properties.groupName |
string |
The name of the Power BI group. Use this property to help remember which specific Power BI group id was used. |
|
properties.refreshToken |
string |
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. |
|
properties.table |
string |
The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests. |
|
properties.tokenUserDisplayName |
string |
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. |
|
properties.tokenUserPrincipalName |
string |
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. |
|
type |
string:
PowerBI |
Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. |
ResourceTestStatus
Describes the status of the test operation along with error information, if applicable.
Name | Type | Description |
---|---|---|
error |
Describes the error that occurred. |
|
status |
string |
The status of the test operation. |
ServiceBusQueueOutputDataSource
Describes a Service Bus Queue output data source.
Name | Type | Default value | Description |
---|---|---|---|
properties.authenticationMode | ConnectionString |
Authentication Mode. |
|
properties.propertyColumns |
string[] |
A string array of the names of output columns to be attached to Service Bus messages as custom properties. |
|
properties.queueName |
string |
The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests. |
|
properties.serviceBusNamespace |
string |
The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. |
|
properties.sharedAccessPolicyKey |
string |
The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. |
|
properties.sharedAccessPolicyName |
string |
The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. |
|
properties.systemPropertyColumns |
object |
The system properties associated with the Service Bus Queue. The following system properties are supported: ReplyToSessionId, ContentType, To, Subject, CorrelationId, TimeToLive, PartitionKey, SessionId, ScheduledEnqueueTime, MessageId, ReplyTo, Label, ScheduledEnqueueTimeUtc. |
|
type |
string:
Microsoft. |
Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. |
ServiceBusTopicOutputDataSource
Describes a Service Bus Topic output data source.
Name | Type | Default value | Description |
---|---|---|---|
properties.authenticationMode | ConnectionString |
Authentication Mode. |
|
properties.propertyColumns |
string[] |
A string array of the names of output columns to be attached to Service Bus messages as custom properties. |
|
properties.serviceBusNamespace |
string |
The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. |
|
properties.sharedAccessPolicyKey |
string |
The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. |
|
properties.sharedAccessPolicyName |
string |
The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. |
|
properties.systemPropertyColumns |
object |
The system properties associated with the Service Bus Topic Output. The following system properties are supported: ReplyToSessionId, ContentType, To, Subject, CorrelationId, TimeToLive, PartitionKey, SessionId, ScheduledEnqueueTime, MessageId, ReplyTo, Label, ScheduledEnqueueTimeUtc. |
|
properties.topicName |
string |
The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests. |
|
type |
string:
Microsoft. |
Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. |
StorageAccount
The properties that are associated with an Azure Storage account
Name | Type | Description |
---|---|---|
accountKey |
string |
The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. |
accountName |
string |
The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. |