Skip to main content

streaming_jobs

Creates, updates, deletes, gets or lists a streaming_jobs resource.

Overview

Namestreaming_jobs
TypeResource
Idazure.stream_analytics.streaming_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
clusterobjectThe cluster which streaming jobs will run on.
compatibilityLevelstringControls certain runtime behaviors of the streaming job. Known values are: "1.0" and "1.2".
contentStoragePolicystringValid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. . Known values are: "SystemAccount" and "JobStorageAccount".
createdDatestring (date-time)Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created.
dataLocalestringThe 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.
etagstringThe current entity tag for the streaming job. 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.
eventsLateArrivalMaxDelayInSecondsintegerThe 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.
eventsOutOfOrderMaxDelayInSecondsintegerThe maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order.
eventsOutOfOrderPolicystringIndicates the policy to apply to events that arrive out of order in the input event stream. Known values are: "Adjust" and "Drop".
externalsobjectThe storage account where the custom code artifacts are located.
functionsarrayA 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.
identityobjectDescribes the managed identity assigned to this job that can be used to authenticate with inputs and outputs.
inputsarrayA 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.
jobIdstringA GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job.
jobStatestringDescribes the state of the streaming job.
jobStorageAccountobjectThe properties that are associated with an Azure Storage account with MSI.
jobTypestringDescribes the type of the job. Valid modes are Cloud and 'Edge'. Known values are: "Cloud" and "Edge".
lastOutputEventTimestring (date-time)Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in that set.
locationstringThe geo-location where the resource lives.
outputErrorPolicystringIndicates 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). Known values are: "Stop" and "Drop".
outputStartModestringThis 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. Known values are: "JobStartTime", "CustomTime", and "LastOutputEventTime".
outputStartTimestring (date-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.
outputsarrayA 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.
provisioningStatestringDescribes the provisioning status of the streaming job.
skuobjectDescribes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests.
tagsobjectResource tags.
transformationobjectIndicates 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.
typestringThe type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, job_name, subscription_id$expandGets details about the specified streaming job.
list_by_resource_groupselectresource_group_name, subscription_id$expandLists all of the streaming jobs in the specified resource group.
listselectsubscription_id$expandLists all of the streaming jobs in the given subscription.
create_or_replaceinsertresource_group_name, job_name, subscription_idIf-Match, If-None-MatchCreates a streaming job or replaces an already existing streaming job.
updateupdateresource_group_name, job_name, subscription_idIf-MatchUpdates 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.
create_or_replacereplaceresource_group_name, job_name, subscription_idIf-Match, If-None-MatchCreates a streaming job or replaces an already existing streaming job.
deletedeleteresource_group_name, job_name, subscription_idDeletes a streaming job.
startexecresource_group_name, job_name, subscription_idStarts a streaming job. Once a job is started it will start processing input events and produce output.
stopexecresource_group_name, job_name, subscription_idStops a running streaming job. This will cause a running streaming job to stop processing input events and producing output.
scaleexecresource_group_name, job_name, subscription_idScales a streaming job when the job is running.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
job_namestringThe name of the streaming job. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$expandstringThe $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'. Default value is None.
If-MatchstringThe 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. Default value is None.
If-None-MatchstringSet 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. Default value is None.

SELECT examples

Gets details about the specified streaming job.

SELECT
id,
name,
cluster,
compatibilityLevel,
contentStoragePolicy,
createdDate,
dataLocale,
etag,
eventsLateArrivalMaxDelayInSeconds,
eventsOutOfOrderMaxDelayInSeconds,
eventsOutOfOrderPolicy,
externals,
functions,
identity,
inputs,
jobId,
jobState,
jobStorageAccount,
jobType,
lastOutputEventTime,
location,
outputErrorPolicy,
outputStartMode,
outputStartTime,
outputs,
provisioningState,
sku,
tags,
transformation,
type
FROM azure.stream_analytics.streaming_jobs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND job_name = '{{ job_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

Creates a streaming job or replaces an already existing streaming job.

INSERT INTO azure.stream_analytics.streaming_jobs (
tags,
location,
sku,
identity,
properties,
resource_group_name,
job_name,
subscription_id,
If-Match,
If-None-Match
)
SELECT
'{{ tags }}',
'{{ location }}',
'{{ sku }}',
'{{ identity }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ job_name }}',
'{{ subscription_id }}',
'{{ If-Match }}',
'{{ If-None-Match }}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
tags,
type
;

UPDATE examples

Updates 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.

UPDATE azure.stream_analytics.streaming_jobs
SET
tags = '{{ tags }}',
location = '{{ location }}',
sku = '{{ sku }}',
identity = '{{ identity }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND job_name = '{{ job_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
tags,
type;

REPLACE examples

Creates a streaming job or replaces an already existing streaming job.

REPLACE azure.stream_analytics.streaming_jobs
SET
tags = '{{ tags }}',
location = '{{ location }}',
sku = '{{ sku }}',
identity = '{{ identity }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND job_name = '{{ job_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match}}'
AND If-None-Match = '{{ If-None-Match}}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
tags,
type;

DELETE examples

Deletes a streaming job.

DELETE FROM azure.stream_analytics.streaming_jobs
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND job_name = '{{ job_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Starts a streaming job. Once a job is started it will start processing input events and produce output.

EXEC azure.stream_analytics.streaming_jobs.start 
@resource_group_name='{{ resource_group_name }}' --required,
@job_name='{{ job_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"outputStartMode": "{{ outputStartMode }}",
"outputStartTime": "{{ outputStartTime }}"
}'
;