az stream-analytics job
Note
This reference is part of the stream-analytics extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az stream-analytics job command. Learn more about extensions.
Manage streaming job with stream analytics.
Commands
Name | Description | Type | Status |
---|---|---|---|
az stream-analytics job create |
Create a streaming job or replaces an already existing streaming job. |
Extension | GA |
az stream-analytics job delete |
Delete a streaming job. |
Extension | GA |
az stream-analytics job list |
List all of the streaming jobs in the specified resource group. And Lists all of the streaming jobs in the given subscription. |
Extension | GA |
az stream-analytics job scale |
Scale a streaming job when the job is running. |
Extension | GA |
az stream-analytics job show |
Get details about the specified streaming job. |
Extension | GA |
az stream-analytics job start |
Start a streaming job. Once a job is started it will start processing input events and produce output. |
Extension | GA |
az stream-analytics job stop |
Stop a running streaming job. This will cause a running streaming job to stop processing input events and producing output. |
Extension | GA |
az stream-analytics job update |
Update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. |
Extension | GA |
az stream-analytics job wait |
Place the CLI in a waiting state until a condition of the stream-analytics job is met. |
Extension | GA |
az stream-analytics job create
Create a streaming job or replaces an already existing streaming job.
az stream-analytics job create --job-name
--resource-group
[--arrival-max-delay]
[--compatibility-level {1.0, 1.2}]
[--content-storage-policy {JobStorageAccount, SystemAccount}]
[--data-locale]
[--functions]
[--id]
[--identity]
[--if-match]
[--if-none-match]
[--inputs]
[--job-storage-account]
[--job-type {Cloud, Edge}]
[--location]
[--no-wait]
[--order-max-delay]
[--out-of-order-policy {Adjust, Drop}]
[--output-error-policy {Drop, Stop}]
[--output-start-mode {CustomTime, JobStartTime, LastOutputEventTime}]
[--output-start-time]
[--outputs]
[--tags]
[--transformation]
Examples
Create a complete streaming job (a streaming job with a transformation, at least 1 input and at least 1 output)
az stream-analytics job create --job-name "sj7804" --resource-group "sjrg3276" --location "West US" --compatibility-level "1.0" --data-locale "en-US" --arrival-max-delay 5 --order-max-delay 0 --out-of-order-policy "Drop" --functions "[]" --inputs "[{\"name\":\"inputtest\",\"properties\":{\"type\":\"Stream\",\"datasource\":{\"type\":\"Microsoft.Storage/Blob\",\"properties\":{\"container\":\"containerName\",\"pathPattern\":\"\",\"storageAccounts\":[{\"accountKey\":\"yourAccountKey==\",\"accountName\":\"yourAccountName\"}]}},\"serialization\":{\"type\":\"Json\",\"properties\":{\"encoding\":\"UTF8\"}}}}]" --output-error-policy "Drop" --outputs "[{\"name\":\"outputtest\",\"datasource\":{\"type\":\"Microsoft.Sql/Server/Database\",\"properties\":{\"database\":\"databaseName\",\"password\":\"userPassword\",\"server\":\"serverName\",\"table\":\"tableName\",\"user\":\"<user>\"}}}]" --transformation name="transformationtest" streaming-units=1 query="Select Id, Name from inputtest" --tags key1="value1" key3="value3" randomKey="randomValue"
Create a streaming job shell (a streaming job with no inputs, outputs, transformation, or functions)
az stream-analytics job create --job-name "sj59" --resource-group "sjrg6936" --location "West US" --compatibility-level "1.0" --data-locale "en-US" --arrival-max-delay 16 --order-max-delay 5 --out-of-order-policy "Drop" --functions "[]" --inputs "[]" --output-error-policy "Drop" --outputs "[]" --tags key1="value1" key3="value3" randomKey="randomValue"
Required Parameters
The name of the streaming job.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
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.
Controls certain runtime behaviors of the streaming job.
Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. .
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/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if none specified.
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. Expected value: json-string/json-file/@json-file.
The resource id of cluster.
Describe the system-assigned managed identity assigned to this job that can be used to authenticate with inputs and outputs.
Usage: --identity tenant-id=XX principal-id=XX type=XX
tenant-id: The identity tenantId principal-id: The identity principal ID type: The identity type.
The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.
Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.
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. Expected value: json-string/json-file/@json-file.
The properties that are associated with an Azure Storage account with MSI.
Usage: --job-storage-account authentication-mode=XX account-name=XX account-key=XX
authentication-mode: Authentication Mode. account-name: The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. account-key: The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.
Describes the type of the job. Valid modes are Cloud
and 'Edge'.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Do not wait for the long-running operation to finish.
The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order.
Indicates the policy to apply to events that arrive out of order in the input event stream.
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).
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.
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.
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. Expected value: json-string/json-file/@json-file.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Indicate 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.
Usage: --transformation streaming-units=XX valid-streaming-units=XX query=XX name=XX
streaming-units: Specifies the number of streaming units that the streaming job uses. valid-streaming-units: Specifies the valid streaming units a streaming job can scale to. query: 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. name: Resource name.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az stream-analytics job delete
Delete a streaming job.
az stream-analytics job delete --job-name
--resource-group
[--no-wait]
[--yes]
Examples
Delete a streaming job
az stream-analytics job delete --job-name "sj59" --resource-group "sjrg6936"
Required Parameters
The name of the streaming job.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Do not wait for the long-running operation to finish.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az stream-analytics job list
List all of the streaming jobs in the specified resource group. And Lists all of the streaming jobs in the given subscription.
az stream-analytics job list [--expand]
[--resource-group]
Examples
List all streaming jobs in a resource group and do not use the $expand OData query parameter
az stream-analytics job list --resource-group "sjrg6936"
List all streaming jobs in a resource group and use the $expand OData query parameter to expand inputs, outputs, transformation, and functions
az stream-analytics job list --expand "inputs,outputs,transformation,functions" --resource-group "sjrg3276"
List all streaming jobs in a subscription and do not use the $expand OData query parameter
az stream-analytics job list
List all streaming jobs in a subscription and use the $expand OData query parameter to expand inputs, outputs, transformation, and functions
az stream-analytics job list --expand "inputs,outputs,transformation,functions"
Optional Parameters
The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az stream-analytics job scale
Scale a streaming job when the job is running.
az stream-analytics job scale --job-name
--resource-group
[--no-wait]
[--streaming-units]
Examples
Scale a streaming job
az stream-analytics job scale --job-name "sj59" --resource-group "sjrg6936" --streaming-units 36
Required Parameters
The name of the streaming job.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Do not wait for the long-running operation to finish.
Specifies the number of streaming units that the streaming job will scale to.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az stream-analytics job show
Get details about the specified streaming job.
az stream-analytics job show --job-name
--resource-group
[--expand]
Examples
Get a streaming job and do not use the $expand OData query parameter
az stream-analytics job show --job-name "sj59" --resource-group "sjrg6936"
Get a streaming job and use the $expand OData query parameter to expand inputs, outputs, transformation, and functions
az stream-analytics job show --expand "inputs,outputs,transformation,functions" --job-name "sj7804" --resource-group "sjrg3276"
Required Parameters
The name of the streaming job.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az stream-analytics job start
Start a streaming job. Once a job is started it will start processing input events and produce output.
az stream-analytics job start --job-name
--resource-group
[--no-wait]
[--output-start-mode {CustomTime, JobStartTime, LastOutputEventTime}]
[--output-start-time]
Examples
Start a streaming job with CustomTime output start mode
az stream-analytics job start --job-name "sj59" --resource-group "sjrg6936" --output-start-mode "CustomTime" --output-start-time "2012-12-12T12:12:12Z"
Start a streaming job with JobStartTime output start mode
az stream-analytics job start --job-name "sj59" --resource-group "sjrg6936" --output-start-mode "JobStartTime"
Start a streaming job with LastOutputEventTime output start mode
az stream-analytics job start --job-name "sj59" --resource-group "sjrg6936" --output-start-mode "LastOutputEventTime"
Required Parameters
The name of the streaming job.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Do not wait for the long-running operation to finish.
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.
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.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az stream-analytics job stop
Stop a running streaming job. This will cause a running streaming job to stop processing input events and producing output.
az stream-analytics job stop --job-name
--resource-group
[--no-wait]
Examples
Stop a streaming job
az stream-analytics job stop --job-name "sj59" --resource-group "sjrg6936"
Required Parameters
The name of the streaming job.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Do not wait for the long-running operation to finish.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az stream-analytics job update
Update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition.
az stream-analytics job update --job-name
--resource-group
[--arrival-max-delay]
[--compatibility-level {1.0, 1.2}]
[--content-storage-policy {JobStorageAccount, SystemAccount}]
[--data-locale]
[--functions]
[--id]
[--identity]
[--if-match]
[--inputs]
[--job-storage-account]
[--job-type {Cloud, Edge}]
[--location]
[--order-max-delay]
[--out-of-order-policy {Adjust, Drop}]
[--output-error-policy {Drop, Stop}]
[--output-start-mode {CustomTime, JobStartTime, LastOutputEventTime}]
[--output-start-time]
[--outputs]
[--tags]
[--transformation]
Examples
Update a streaming job
az stream-analytics job update --job-name "sj59" --resource-group "sjrg6936" --arrival-max-delay 13 --order-max-delay 21
Required Parameters
The name of the streaming job.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
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.
Controls certain runtime behaviors of the streaming job.
Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. .
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/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if none specified.
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. Expected value: json-string/json-file/@json-file.
The resource id of cluster.
Describe the system-assigned managed identity assigned to this job that can be used to authenticate with inputs and outputs.
Usage: --identity tenant-id=XX principal-id=XX type=XX
tenant-id: The identity tenantId principal-id: The identity principal ID type: The identity type.
The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.
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. Expected value: json-string/json-file/@json-file.
The properties that are associated with an Azure Storage account with MSI.
Usage: --job-storage-account authentication-mode=XX account-name=XX account-key=XX
authentication-mode: Authentication Mode. account-name: The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. account-key: The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.
Describes the type of the job. Valid modes are Cloud
and 'Edge'.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order.
Indicates the policy to apply to events that arrive out of order in the input event stream.
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).
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.
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.
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. Expected value: json-string/json-file/@json-file.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Indicate 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.
Usage: --transformation streaming-units=XX valid-streaming-units=XX query=XX name=XX
streaming-units: Specifies the number of streaming units that the streaming job uses. valid-streaming-units: Specifies the valid streaming units a streaming job can scale to. query: 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. name: Resource name.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az stream-analytics job wait
Place the CLI in a waiting state until a condition of the stream-analytics job is met.
az stream-analytics job wait --job-name
--resource-group
[--created]
[--custom]
[--deleted]
[--exists]
[--expand]
[--interval]
[--timeout]
[--updated]
Examples
Pause executing next line of CLI script until the stream-analytics job is successfully created.
az stream-analytics job wait --expand "inputs,outputs,transformation,functions" --job-name "sj7804" --resource-group "sjrg3276" --created
Pause executing next line of CLI script until the stream-analytics job is successfully deleted.
az stream-analytics job wait --expand "inputs,outputs,transformation,functions" --job-name "sj7804" --resource-group "sjrg3276" --deleted
Required Parameters
The name of the streaming job.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
The $expand OData query parameter. This is a comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'.
Polling interval in seconds.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI