Skip to main content

jobs_metrics

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

Overview​

Namejobs_metrics
TypeResource
Idgoogle.dataflow.jobs_metrics

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
metricTimestring (google-datetime)Timestamp as of which metric values are current.
metricsarrayAll metrics for this job.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_jobs_get_metricsselectprojectId, location, jobIdstartTimeRequest the job status. To request the status of a job, we recommend using projects.locations.jobs.getMetrics with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.getMetrics is not recommended, as you can only request the status of jobs that are running in us-central1. # IAM Permissions Requires the dataflow.metrics.get permission on the job.
projects_jobs_get_metricsselectprojectId, jobIdlocation, startTimeRequest the job status. To request the status of a job, we recommend using projects.locations.jobs.getMetrics with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.getMetrics is not recommended, as you can only request the status of jobs that are running in us-central1. # IAM Permissions Requires the dataflow.metrics.get permission on the job.

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
jobIdstring
locationstring
projectIdstring
locationstring
startTimestring (google-datetime)

SELECT examples​

Request the job status. To request the status of a job, we recommend using projects.locations.jobs.getMetrics with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.getMetrics is not recommended, as you can only request the status of jobs that are running in us-central1. # IAM Permissions Requires the dataflow.metrics.get permission on the job.

SELECT
metricTime,
metrics
FROM google.dataflow.jobs_metrics
WHERE projectId = '{{ projectId }}' -- required
AND location = '{{ location }}' -- required
AND jobId = '{{ jobId }}' -- required
AND startTime = '{{ startTime }}'
;