Skip to main content

job_task_counts

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

Overview

Namejob_task_counts
TypeResource
Idazure.batch_dataplane.job_task_counts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
taskCountsobjectThe number of Tasks per state. Required.
taskSlotCountsobjectThe number of TaskSlots required by Tasks per state. Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_job_task_countsselectjob_id, endpointtimeOut, ocp-dateGets the Task counts for the specified Job. Task counts provide a count of the Tasks by active, running or completed Task state, and a count of Tasks which succeeded or failed. Tasks in the preparing state are counted as running. Note that the numbers returned may not always be up to date. If you need exact task counts, use a list query.

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
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
job_idstringThe ID of the Job. Required.
ocp-datestringThe time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None.
timeOutintegerThe maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None.

SELECT examples

Gets the Task counts for the specified Job. Task counts provide a count of the Tasks by active, running or completed Task state, and a count of Tasks which succeeded or failed. Tasks in the preparing state are counted as running. Note that the numbers returned may not always be up to date. If you need exact task counts, use a list query.

SELECT
taskCounts,
taskSlotCounts
FROM azure.batch_dataplane.job_task_counts
WHERE job_id = '{{ job_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND timeOut = '{{ timeOut }}'
AND ocp-date = '{{ ocp-date }}'
;