jobs
Creates, updates, deletes, gets or lists a jobs
resource.
Overview
Name | jobs |
Type | Resource |
Id | google.dataflow.jobs |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_jobs_get
- projects_jobs_get
- projects_locations_jobs_list
- projects_jobs_list
Successful response
Name | Datatype | Description |
---|---|---|
id | string | The unique ID of this job. This field is set by the Dataflow service when the job is created, and is immutable for the life of the job. |
name | string | Optional. The user-specified Dataflow job name. Only one active job with a given name can exist in a project within one region at any given time. Jobs in different regions can have the same name. If a caller attempts to create a job with the same name as an active job that already exists, the attempt returns the existing job. The name must match the regular expression [a-z]([-a-z0-9]{0,1022}[a-z0-9])? |
clientRequestId | string | The client's unique identifier of the job, re-used across retried attempts. If this field is set, the service will ensure its uniqueness. The request to create a job will fail if the service has knowledge of a previously submitted job with the same client's ID and job name. The caller may use this field to ensure idempotence of job creation across retried attempts to create a job. By default, the field is empty and, in that case, the service ignores it. |
createTime | string (google-datetime) | The timestamp when the job was initially created. Immutable and set by the Cloud Dataflow service. |
createdFromSnapshotId | string | If this is specified, the job's initial state is populated from the given snapshot. |
currentState | string | The current state of the job. Jobs are created in the JOB_STATE_STOPPED state unless otherwise specified. A job in the JOB_STATE_RUNNING state may asynchronously enter a terminal state. After a job has reached a terminal state, no further state updates may be made. This field might be mutated by the Dataflow service; callers cannot mutate it. |
currentStateTime | string (google-datetime) | The timestamp associated with the current state. |
environment | object | Optional. The environment for the job. (id: Environment) |
executionInfo | object | Deprecated. (id: JobExecutionInfo) |
jobMetadata | object | This field is populated by the Dataflow service to support filtering jobs by the metadata values provided here. Populated for ListJobs and all GetJob views SUMMARY and higher. (id: JobMetadata) |
labels | object | User-defined labels for this job. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size. |
location | string | Optional. The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job. |
pipelineDescription | object | Preliminary field: The format of this data may change at any time. A description of the user pipeline and stages through which it is executed. Created by Cloud Dataflow service. Only retrieved with JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL. (id: PipelineDescription) |
projectId | string | The ID of the Google Cloud project that the job belongs to. |
replaceJobId | string | If this job is an update of an existing job, this field is the job ID of the job it replaced. When sending a CreateJobRequest , you can update a job by specifying it here. The job named here is stopped, and its intermediate state is transferred to this job. |
replacedByJobId | string | If another job is an update of this job (and thus, this job is in JOB_STATE_UPDATED ), this field contains the ID of that job. |
requestedState | string | The job's requested state. Applies to UpdateJob requests. Set requested_state with UpdateJob requests to switch between the states JOB_STATE_STOPPED and JOB_STATE_RUNNING . You can also use UpdateJob requests to change a job's state from JOB_STATE_RUNNING to JOB_STATE_CANCELLED , JOB_STATE_DONE , or JOB_STATE_DRAINED . These states irrevocably terminate the job if it hasn't already reached a terminal state. This field has no effect on CreateJob requests. |
runtimeUpdatableParams | object | This field may ONLY be modified at runtime using the projects.jobs.update method to adjust job behavior. This field has no effect when specified at job creation. (id: RuntimeUpdatableParams) |
satisfiesPzi | boolean | Output only. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. |
satisfiesPzs | boolean | Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. |
serviceResources | object | Output only. Resources used by the Dataflow Service to run the job. (id: ServiceResources) |
stageStates | array | This field may be mutated by the Cloud Dataflow service; callers cannot mutate it. |
startTime | string (google-datetime) | The timestamp when the job was started (transitioned to JOB_STATE_PENDING). Flexible resource scheduling jobs are started with some delay after job creation, so start_time is unset before start and is updated when the job is started by the Cloud Dataflow service. For other jobs, start_time always equals to create_time and is immutable and set by the Cloud Dataflow service. |
steps | array | Exactly one of step or steps_location should be specified. The top-level steps that constitute the entire job. Only retrieved with JOB_VIEW_ALL. |
stepsLocation | string | The Cloud Storage location where the steps are stored. |
tempFiles | array | A set of files the system should be aware of that are used for temporary storage. These temporary files will be removed on job completion. No duplicates are allowed. No file patterns are supported. The supported files are: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object} |
transformNameMapping | object | Optional. The map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job. |
type | string | Optional. The type of Dataflow job. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string | The unique ID of this job. This field is set by the Dataflow service when the job is created, and is immutable for the life of the job. |
name | string | Optional. The user-specified Dataflow job name. Only one active job with a given name can exist in a project within one region at any given time. Jobs in different regions can have the same name. If a caller attempts to create a job with the same name as an active job that already exists, the attempt returns the existing job. The name must match the regular expression [a-z]([-a-z0-9]{0,1022}[a-z0-9])? |
clientRequestId | string | The client's unique identifier of the job, re-used across retried attempts. If this field is set, the service will ensure its uniqueness. The request to create a job will fail if the service has knowledge of a previously submitted job with the same client's ID and job name. The caller may use this field to ensure idempotence of job creation across retried attempts to create a job. By default, the field is empty and, in that case, the service ignores it. |
createTime | string (google-datetime) | The timestamp when the job was initially created. Immutable and set by the Cloud Dataflow service. |
createdFromSnapshotId | string | If this is specified, the job's initial state is populated from the given snapshot. |
currentState | string | The current state of the job. Jobs are created in the JOB_STATE_STOPPED state unless otherwise specified. A job in the JOB_STATE_RUNNING state may asynchronously enter a terminal state. After a job has reached a terminal state, no further state updates may be made. This field might be mutated by the Dataflow service; callers cannot mutate it. |
currentStateTime | string (google-datetime) | The timestamp associated with the current state. |
environment | object | Optional. The environment for the job. (id: Environment) |
executionInfo | object | Deprecated. (id: JobExecutionInfo) |
jobMetadata | object | This field is populated by the Dataflow service to support filtering jobs by the metadata values provided here. Populated for ListJobs and all GetJob views SUMMARY and higher. (id: JobMetadata) |
labels | object | User-defined labels for this job. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size. |
location | string | Optional. The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job. |
pipelineDescription | object | Preliminary field: The format of this data may change at any time. A description of the user pipeline and stages through which it is executed. Created by Cloud Dataflow service. Only retrieved with JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL. (id: PipelineDescription) |
projectId | string | The ID of the Google Cloud project that the job belongs to. |
replaceJobId | string | If this job is an update of an existing job, this field is the job ID of the job it replaced. When sending a CreateJobRequest , you can update a job by specifying it here. The job named here is stopped, and its intermediate state is transferred to this job. |
replacedByJobId | string | If another job is an update of this job (and thus, this job is in JOB_STATE_UPDATED ), this field contains the ID of that job. |
requestedState | string | The job's requested state. Applies to UpdateJob requests. Set requested_state with UpdateJob requests to switch between the states JOB_STATE_STOPPED and JOB_STATE_RUNNING . You can also use UpdateJob requests to change a job's state from JOB_STATE_RUNNING to JOB_STATE_CANCELLED , JOB_STATE_DONE , or JOB_STATE_DRAINED . These states irrevocably terminate the job if it hasn't already reached a terminal state. This field has no effect on CreateJob requests. |
runtimeUpdatableParams | object | This field may ONLY be modified at runtime using the projects.jobs.update method to adjust job behavior. This field has no effect when specified at job creation. (id: RuntimeUpdatableParams) |
satisfiesPzi | boolean | Output only. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. |
satisfiesPzs | boolean | Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. |
serviceResources | object | Output only. Resources used by the Dataflow Service to run the job. (id: ServiceResources) |
stageStates | array | This field may be mutated by the Cloud Dataflow service; callers cannot mutate it. |
startTime | string (google-datetime) | The timestamp when the job was started (transitioned to JOB_STATE_PENDING). Flexible resource scheduling jobs are started with some delay after job creation, so start_time is unset before start and is updated when the job is started by the Cloud Dataflow service. For other jobs, start_time always equals to create_time and is immutable and set by the Cloud Dataflow service. |
steps | array | Exactly one of step or steps_location should be specified. The top-level steps that constitute the entire job. Only retrieved with JOB_VIEW_ALL. |
stepsLocation | string | The Cloud Storage location where the steps are stored. |
tempFiles | array | A set of files the system should be aware of that are used for temporary storage. These temporary files will be removed on job completion. No duplicates are allowed. No file patterns are supported. The supported files are: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object} |
transformNameMapping | object | Optional. The map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job. |
type | string | Optional. The type of Dataflow job. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string | The unique ID of this job. This field is set by the Dataflow service when the job is created, and is immutable for the life of the job. |
name | string | Optional. The user-specified Dataflow job name. Only one active job with a given name can exist in a project within one region at any given time. Jobs in different regions can have the same name. If a caller attempts to create a job with the same name as an active job that already exists, the attempt returns the existing job. The name must match the regular expression [a-z]([-a-z0-9]{0,1022}[a-z0-9])? |
clientRequestId | string | The client's unique identifier of the job, re-used across retried attempts. If this field is set, the service will ensure its uniqueness. The request to create a job will fail if the service has knowledge of a previously submitted job with the same client's ID and job name. The caller may use this field to ensure idempotence of job creation across retried attempts to create a job. By default, the field is empty and, in that case, the service ignores it. |
createTime | string (google-datetime) | The timestamp when the job was initially created. Immutable and set by the Cloud Dataflow service. |
createdFromSnapshotId | string | If this is specified, the job's initial state is populated from the given snapshot. |
currentState | string | The current state of the job. Jobs are created in the JOB_STATE_STOPPED state unless otherwise specified. A job in the JOB_STATE_RUNNING state may asynchronously enter a terminal state. After a job has reached a terminal state, no further state updates may be made. This field might be mutated by the Dataflow service; callers cannot mutate it. |
currentStateTime | string (google-datetime) | The timestamp associated with the current state. |
environment | object | Optional. The environment for the job. (id: Environment) |
executionInfo | object | Deprecated. (id: JobExecutionInfo) |
jobMetadata | object | This field is populated by the Dataflow service to support filtering jobs by the metadata values provided here. Populated for ListJobs and all GetJob views SUMMARY and higher. (id: JobMetadata) |
labels | object | User-defined labels for this job. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size. |
location | string | Optional. The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job. |
pipelineDescription | object | Preliminary field: The format of this data may change at any time. A description of the user pipeline and stages through which it is executed. Created by Cloud Dataflow service. Only retrieved with JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL. (id: PipelineDescription) |
projectId | string | The ID of the Google Cloud project that the job belongs to. |
replaceJobId | string | If this job is an update of an existing job, this field is the job ID of the job it replaced. When sending a CreateJobRequest , you can update a job by specifying it here. The job named here is stopped, and its intermediate state is transferred to this job. |
replacedByJobId | string | If another job is an update of this job (and thus, this job is in JOB_STATE_UPDATED ), this field contains the ID of that job. |
requestedState | string | The job's requested state. Applies to UpdateJob requests. Set requested_state with UpdateJob requests to switch between the states JOB_STATE_STOPPED and JOB_STATE_RUNNING . You can also use UpdateJob requests to change a job's state from JOB_STATE_RUNNING to JOB_STATE_CANCELLED , JOB_STATE_DONE , or JOB_STATE_DRAINED . These states irrevocably terminate the job if it hasn't already reached a terminal state. This field has no effect on CreateJob requests. |
runtimeUpdatableParams | object | This field may ONLY be modified at runtime using the projects.jobs.update method to adjust job behavior. This field has no effect when specified at job creation. (id: RuntimeUpdatableParams) |
satisfiesPzi | boolean | Output only. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. |
satisfiesPzs | boolean | Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. |
serviceResources | object | Output only. Resources used by the Dataflow Service to run the job. (id: ServiceResources) |
stageStates | array | This field may be mutated by the Cloud Dataflow service; callers cannot mutate it. |
startTime | string (google-datetime) | The timestamp when the job was started (transitioned to JOB_STATE_PENDING). Flexible resource scheduling jobs are started with some delay after job creation, so start_time is unset before start and is updated when the job is started by the Cloud Dataflow service. For other jobs, start_time always equals to create_time and is immutable and set by the Cloud Dataflow service. |
steps | array | Exactly one of step or steps_location should be specified. The top-level steps that constitute the entire job. Only retrieved with JOB_VIEW_ALL. |
stepsLocation | string | The Cloud Storage location where the steps are stored. |
tempFiles | array | A set of files the system should be aware of that are used for temporary storage. These temporary files will be removed on job completion. No duplicates are allowed. No file patterns are supported. The supported files are: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object} |
transformNameMapping | object | Optional. The map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job. |
type | string | Optional. The type of Dataflow job. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string | The unique ID of this job. This field is set by the Dataflow service when the job is created, and is immutable for the life of the job. |
name | string | Optional. The user-specified Dataflow job name. Only one active job with a given name can exist in a project within one region at any given time. Jobs in different regions can have the same name. If a caller attempts to create a job with the same name as an active job that already exists, the attempt returns the existing job. The name must match the regular expression [a-z]([-a-z0-9]{0,1022}[a-z0-9])? |
clientRequestId | string | The client's unique identifier of the job, re-used across retried attempts. If this field is set, the service will ensure its uniqueness. The request to create a job will fail if the service has knowledge of a previously submitted job with the same client's ID and job name. The caller may use this field to ensure idempotence of job creation across retried attempts to create a job. By default, the field is empty and, in that case, the service ignores it. |
createTime | string (google-datetime) | The timestamp when the job was initially created. Immutable and set by the Cloud Dataflow service. |
createdFromSnapshotId | string | If this is specified, the job's initial state is populated from the given snapshot. |
currentState | string | The current state of the job. Jobs are created in the JOB_STATE_STOPPED state unless otherwise specified. A job in the JOB_STATE_RUNNING state may asynchronously enter a terminal state. After a job has reached a terminal state, no further state updates may be made. This field might be mutated by the Dataflow service; callers cannot mutate it. |
currentStateTime | string (google-datetime) | The timestamp associated with the current state. |
environment | object | Optional. The environment for the job. (id: Environment) |
executionInfo | object | Deprecated. (id: JobExecutionInfo) |
jobMetadata | object | This field is populated by the Dataflow service to support filtering jobs by the metadata values provided here. Populated for ListJobs and all GetJob views SUMMARY and higher. (id: JobMetadata) |
labels | object | User-defined labels for this job. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size. |
location | string | Optional. The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job. |
pipelineDescription | object | Preliminary field: The format of this data may change at any time. A description of the user pipeline and stages through which it is executed. Created by Cloud Dataflow service. Only retrieved with JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL. (id: PipelineDescription) |
projectId | string | The ID of the Google Cloud project that the job belongs to. |
replaceJobId | string | If this job is an update of an existing job, this field is the job ID of the job it replaced. When sending a CreateJobRequest , you can update a job by specifying it here. The job named here is stopped, and its intermediate state is transferred to this job. |
replacedByJobId | string | If another job is an update of this job (and thus, this job is in JOB_STATE_UPDATED ), this field contains the ID of that job. |
requestedState | string | The job's requested state. Applies to UpdateJob requests. Set requested_state with UpdateJob requests to switch between the states JOB_STATE_STOPPED and JOB_STATE_RUNNING . You can also use UpdateJob requests to change a job's state from JOB_STATE_RUNNING to JOB_STATE_CANCELLED , JOB_STATE_DONE , or JOB_STATE_DRAINED . These states irrevocably terminate the job if it hasn't already reached a terminal state. This field has no effect on CreateJob requests. |
runtimeUpdatableParams | object | This field may ONLY be modified at runtime using the projects.jobs.update method to adjust job behavior. This field has no effect when specified at job creation. (id: RuntimeUpdatableParams) |
satisfiesPzi | boolean | Output only. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. |
satisfiesPzs | boolean | Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. |
serviceResources | object | Output only. Resources used by the Dataflow Service to run the job. (id: ServiceResources) |
stageStates | array | This field may be mutated by the Cloud Dataflow service; callers cannot mutate it. |
startTime | string (google-datetime) | The timestamp when the job was started (transitioned to JOB_STATE_PENDING). Flexible resource scheduling jobs are started with some delay after job creation, so start_time is unset before start and is updated when the job is started by the Cloud Dataflow service. For other jobs, start_time always equals to create_time and is immutable and set by the Cloud Dataflow service. |
steps | array | Exactly one of step or steps_location should be specified. The top-level steps that constitute the entire job. Only retrieved with JOB_VIEW_ALL. |
stepsLocation | string | The Cloud Storage location where the steps are stored. |
tempFiles | array | A set of files the system should be aware of that are used for temporary storage. These temporary files will be removed on job completion. No duplicates are allowed. No file patterns are supported. The supported files are: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object} |
transformNameMapping | object | Optional. The map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job. |
type | string | Optional. The type of Dataflow job. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_jobs_get | select | projectId , location , jobId | view | Gets the state of the specified Cloud Dataflow job. To get the state of a job, we recommend using projects.locations.jobs.get with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.get is not recommended, as you can only get the state of jobs that are running in us-central1 . |
projects_jobs_get | select | projectId , jobId | view , location | Gets the state of the specified Cloud Dataflow job. To get the state of a job, we recommend using projects.locations.jobs.get with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.get is not recommended, as you can only get the state of jobs that are running in us-central1 . |
projects_locations_jobs_list | select | projectId , location | filter , view , pageSize , pageToken , name | List the jobs of a project. To list the jobs of a project in a region, we recommend using projects.locations.jobs.list with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To list the all jobs across all regions, use projects.jobs.aggregated . Using projects.jobs.list is not recommended, because you can only get the list of jobs that are running in us-central1 . projects.locations.jobs.list and projects.jobs.list support filtering the list of jobs by name. Filtering by name isn't supported by projects.jobs.aggregated . |
projects_jobs_list | select | projectId | filter , view , pageSize , pageToken , location , name | List the jobs of a project. To list the jobs of a project in a region, we recommend using projects.locations.jobs.list with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To list the all jobs across all regions, use projects.jobs.aggregated . Using projects.jobs.list is not recommended, because you can only get the list of jobs that are running in us-central1 . projects.locations.jobs.list and projects.jobs.list support filtering the list of jobs by name. Filtering by name isn't supported by projects.jobs.aggregated . |
projects_locations_jobs_create | insert | projectId , location | view , replaceJobId | Creates a Dataflow job. To create a job, we recommend using projects.locations.jobs.create with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.create is not recommended, as your job will always start in us-central1 . Do not enter confidential information when you supply string values using the API. |
projects_jobs_create | insert | projectId | view , replaceJobId , location | Creates a Dataflow job. To create a job, we recommend using projects.locations.jobs.create with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.create is not recommended, as your job will always start in us-central1 . Do not enter confidential information when you supply string values using the API. |
projects_locations_jobs_update | replace | projectId , location , jobId | updateMask | Updates the state of an existing Cloud Dataflow job. To update the state of an existing job, we recommend using projects.locations.jobs.update with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.update is not recommended, as you can only update the state of jobs that are running in us-central1 . |
projects_jobs_update | replace | projectId , jobId | location , updateMask | Updates the state of an existing Cloud Dataflow job. To update the state of an existing job, we recommend using projects.locations.jobs.update with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.update is not recommended, as you can only update the state of jobs that are running in us-central1 . |
projects_jobs_aggregated | exec | projectId | filter , view , pageSize , pageToken , location , name | List the jobs of a project across all regions. Note: This method doesn't support filtering the list of jobs by name. |
projects_jobs_snapshot | exec | projectId , jobId | Snapshot the state of a streaming job. | |
projects_locations_jobs_snapshot | exec | projectId , location , jobId | Snapshot the state of a streaming 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.
Name | Datatype | Description |
---|---|---|
jobId | string | |
location | string | |
projectId | string | |
filter | string | |
location | string | |
name | string | |
pageSize | integer (int32) | |
pageToken | string | |
replaceJobId | string | |
updateMask | string (google-fieldmask) | |
view | string |
SELECT
examples
- projects_locations_jobs_get
- projects_jobs_get
- projects_locations_jobs_list
- projects_jobs_list
Gets the state of the specified Cloud Dataflow job. To get the state of a job, we recommend using projects.locations.jobs.get
with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.get
is not recommended, as you can only get the state of jobs that are running in us-central1
.
SELECT
id,
name,
clientRequestId,
createTime,
createdFromSnapshotId,
currentState,
currentStateTime,
environment,
executionInfo,
jobMetadata,
labels,
location,
pipelineDescription,
projectId,
replaceJobId,
replacedByJobId,
requestedState,
runtimeUpdatableParams,
satisfiesPzi,
satisfiesPzs,
serviceResources,
stageStates,
startTime,
steps,
stepsLocation,
tempFiles,
transformNameMapping,
type
FROM google.dataflow.jobs
WHERE projectId = '{{ projectId }}' -- required
AND location = '{{ location }}' -- required
AND jobId = '{{ jobId }}' -- required
AND view = '{{ view }}';
Gets the state of the specified Cloud Dataflow job. To get the state of a job, we recommend using projects.locations.jobs.get
with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.get
is not recommended, as you can only get the state of jobs that are running in us-central1
.
SELECT
id,
name,
clientRequestId,
createTime,
createdFromSnapshotId,
currentState,
currentStateTime,
environment,
executionInfo,
jobMetadata,
labels,
location,
pipelineDescription,
projectId,
replaceJobId,
replacedByJobId,
requestedState,
runtimeUpdatableParams,
satisfiesPzi,
satisfiesPzs,
serviceResources,
stageStates,
startTime,
steps,
stepsLocation,
tempFiles,
transformNameMapping,
type
FROM google.dataflow.jobs
WHERE projectId = '{{ projectId }}' -- required
AND jobId = '{{ jobId }}' -- required
AND view = '{{ view }}'
AND location = '{{ location }}';
List the jobs of a project. To list the jobs of a project in a region, we recommend using projects.locations.jobs.list
with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To list the all jobs across all regions, use projects.jobs.aggregated
. Using projects.jobs.list
is not recommended, because you can only get the list of jobs that are running in us-central1
. projects.locations.jobs.list
and projects.jobs.list
support filtering the list of jobs by name. Filtering by name isn't supported by projects.jobs.aggregated
.
SELECT
id,
name,
clientRequestId,
createTime,
createdFromSnapshotId,
currentState,
currentStateTime,
environment,
executionInfo,
jobMetadata,
labels,
location,
pipelineDescription,
projectId,
replaceJobId,
replacedByJobId,
requestedState,
runtimeUpdatableParams,
satisfiesPzi,
satisfiesPzs,
serviceResources,
stageStates,
startTime,
steps,
stepsLocation,
tempFiles,
transformNameMapping,
type
FROM google.dataflow.jobs
WHERE projectId = '{{ projectId }}' -- required
AND location = '{{ location }}' -- required
AND filter = '{{ filter }}'
AND view = '{{ view }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND name = '{{ name }}';
List the jobs of a project. To list the jobs of a project in a region, we recommend using projects.locations.jobs.list
with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To list the all jobs across all regions, use projects.jobs.aggregated
. Using projects.jobs.list
is not recommended, because you can only get the list of jobs that are running in us-central1
. projects.locations.jobs.list
and projects.jobs.list
support filtering the list of jobs by name. Filtering by name isn't supported by projects.jobs.aggregated
.
SELECT
id,
name,
clientRequestId,
createTime,
createdFromSnapshotId,
currentState,
currentStateTime,
environment,
executionInfo,
jobMetadata,
labels,
location,
pipelineDescription,
projectId,
replaceJobId,
replacedByJobId,
requestedState,
runtimeUpdatableParams,
satisfiesPzi,
satisfiesPzs,
serviceResources,
stageStates,
startTime,
steps,
stepsLocation,
tempFiles,
transformNameMapping,
type
FROM google.dataflow.jobs
WHERE projectId = '{{ projectId }}' -- required
AND filter = '{{ filter }}'
AND view = '{{ view }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND location = '{{ location }}'
AND name = '{{ name }}';
INSERT
examples
- projects_locations_jobs_create
- projects_jobs_create
- Manifest
Creates a Dataflow job. To create a job, we recommend using projects.locations.jobs.create
with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.create
is not recommended, as your job will always start in us-central1
. Do not enter confidential information when you supply string values using the API.
INSERT INTO google.dataflow.jobs (
data__id,
data__projectId,
data__name,
data__type,
data__environment,
data__steps,
data__stepsLocation,
data__currentState,
data__currentStateTime,
data__requestedState,
data__executionInfo,
data__createTime,
data__replaceJobId,
data__transformNameMapping,
data__clientRequestId,
data__replacedByJobId,
data__tempFiles,
data__labels,
data__location,
data__pipelineDescription,
data__stageStates,
data__jobMetadata,
data__startTime,
data__createdFromSnapshotId,
data__satisfiesPzs,
data__runtimeUpdatableParams,
projectId,
location,
view,
replaceJobId
)
SELECT
'{{ id }}',
'{{ projectId }}',
'{{ name }}',
'{{ type }}',
'{{ environment }}',
'{{ steps }}',
'{{ stepsLocation }}',
'{{ currentState }}',
'{{ currentStateTime }}',
'{{ requestedState }}',
'{{ executionInfo }}',
'{{ createTime }}',
'{{ replaceJobId }}',
'{{ transformNameMapping }}',
'{{ clientRequestId }}',
'{{ replacedByJobId }}',
'{{ tempFiles }}',
'{{ labels }}',
'{{ location }}',
'{{ pipelineDescription }}',
'{{ stageStates }}',
'{{ jobMetadata }}',
'{{ startTime }}',
'{{ createdFromSnapshotId }}',
{{ satisfiesPzs }},
'{{ runtimeUpdatableParams }}',
'{{ projectId }}',
'{{ location }}',
'{{ view }}',
'{{ replaceJobId }}'
RETURNING
id,
name,
clientRequestId,
createTime,
createdFromSnapshotId,
currentState,
currentStateTime,
environment,
executionInfo,
jobMetadata,
labels,
location,
pipelineDescription,
projectId,
replaceJobId,
replacedByJobId,
requestedState,
runtimeUpdatableParams,
satisfiesPzi,
satisfiesPzs,
serviceResources,
stageStates,
startTime,
steps,
stepsLocation,
tempFiles,
transformNameMapping,
type
;
Creates a Dataflow job. To create a job, we recommend using projects.locations.jobs.create
with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.create
is not recommended, as your job will always start in us-central1
. Do not enter confidential information when you supply string values using the API.
INSERT INTO google.dataflow.jobs (
data__id,
data__projectId,
data__name,
data__type,
data__environment,
data__steps,
data__stepsLocation,
data__currentState,
data__currentStateTime,
data__requestedState,
data__executionInfo,
data__createTime,
data__replaceJobId,
data__transformNameMapping,
data__clientRequestId,
data__replacedByJobId,
data__tempFiles,
data__labels,
data__location,
data__pipelineDescription,
data__stageStates,
data__jobMetadata,
data__startTime,
data__createdFromSnapshotId,
data__satisfiesPzs,
data__runtimeUpdatableParams,
projectId,
view,
replaceJobId,
location
)
SELECT
'{{ id }}',
'{{ projectId }}',
'{{ name }}',
'{{ type }}',
'{{ environment }}',
'{{ steps }}',
'{{ stepsLocation }}',
'{{ currentState }}',
'{{ currentStateTime }}',
'{{ requestedState }}',
'{{ executionInfo }}',
'{{ createTime }}',
'{{ replaceJobId }}',
'{{ transformNameMapping }}',
'{{ clientRequestId }}',
'{{ replacedByJobId }}',
'{{ tempFiles }}',
'{{ labels }}',
'{{ location }}',
'{{ pipelineDescription }}',
'{{ stageStates }}',
'{{ jobMetadata }}',
'{{ startTime }}',
'{{ createdFromSnapshotId }}',
{{ satisfiesPzs }},
'{{ runtimeUpdatableParams }}',
'{{ projectId }}',
'{{ view }}',
'{{ replaceJobId }}',
'{{ location }}'
RETURNING
id,
name,
clientRequestId,
createTime,
createdFromSnapshotId,
currentState,
currentStateTime,
environment,
executionInfo,
jobMetadata,
labels,
location,
pipelineDescription,
projectId,
replaceJobId,
replacedByJobId,
requestedState,
runtimeUpdatableParams,
satisfiesPzi,
satisfiesPzs,
serviceResources,
stageStates,
startTime,
steps,
stepsLocation,
tempFiles,
transformNameMapping,
type
;
# Description fields are for documentation purposes
- name: jobs
props:
- name: projectId
value: string
description: Required parameter for the jobs resource.
- name: location
value: string
description: Required parameter for the jobs resource.
- name: id
value: string
description: >
The unique ID of this job. This field is set by the Dataflow service when the job is created, and is immutable for the life of the job.
- name: projectId
value: string
description: >
The ID of the Google Cloud project that the job belongs to.
- name: name
value: string
description: >
Optional. The user-specified Dataflow job name. Only one active job with a given name can exist in a project within one region at any given time. Jobs in different regions can have the same name. If a caller attempts to create a job with the same name as an active job that already exists, the attempt returns the existing job. The name must match the regular expression `[a-z]([-a-z0-9]{0,1022}[a-z0-9])?`
- name: type
value: string
description: >
Optional. The type of Dataflow job.
valid_values: ['JOB_TYPE_UNKNOWN', 'JOB_TYPE_BATCH', 'JOB_TYPE_STREAMING']
- name: environment
value: object
description: >
Optional. The environment for the job.
- name: steps
value: array
description: >
Exactly one of step or steps_location should be specified. The top-level steps that constitute the entire job. Only retrieved with JOB_VIEW_ALL.
- name: stepsLocation
value: string
description: >
The Cloud Storage location where the steps are stored.
- name: currentState
value: string
description: >
The current state of the job. Jobs are created in the `JOB_STATE_STOPPED` state unless otherwise specified. A job in the `JOB_STATE_RUNNING` state may asynchronously enter a terminal state. After a job has reached a terminal state, no further state updates may be made. This field might be mutated by the Dataflow service; callers cannot mutate it.
valid_values: ['JOB_STATE_UNKNOWN', 'JOB_STATE_STOPPED', 'JOB_STATE_RUNNING', 'JOB_STATE_DONE', 'JOB_STATE_FAILED', 'JOB_STATE_CANCELLED', 'JOB_STATE_UPDATED', 'JOB_STATE_DRAINING', 'JOB_STATE_DRAINED', 'JOB_STATE_PENDING', 'JOB_STATE_CANCELLING', 'JOB_STATE_QUEUED', 'JOB_STATE_RESOURCE_CLEANING_UP', 'JOB_STATE_PAUSING', 'JOB_STATE_PAUSED']
- name: currentStateTime
value: string
description: >
The timestamp associated with the current state.
- name: requestedState
value: string
description: >
The job's requested state. Applies to `UpdateJob` requests. Set `requested_state` with `UpdateJob` requests to switch between the states `JOB_STATE_STOPPED` and `JOB_STATE_RUNNING`. You can also use `UpdateJob` requests to change a job's state from `JOB_STATE_RUNNING` to `JOB_STATE_CANCELLED`, `JOB_STATE_DONE`, or `JOB_STATE_DRAINED`. These states irrevocably terminate the job if it hasn't already reached a terminal state. This field has no effect on `CreateJob` requests.
valid_values: ['JOB_STATE_UNKNOWN', 'JOB_STATE_STOPPED', 'JOB_STATE_RUNNING', 'JOB_STATE_DONE', 'JOB_STATE_FAILED', 'JOB_STATE_CANCELLED', 'JOB_STATE_UPDATED', 'JOB_STATE_DRAINING', 'JOB_STATE_DRAINED', 'JOB_STATE_PENDING', 'JOB_STATE_CANCELLING', 'JOB_STATE_QUEUED', 'JOB_STATE_RESOURCE_CLEANING_UP', 'JOB_STATE_PAUSING', 'JOB_STATE_PAUSED']
- name: executionInfo
value: object
description: >
Deprecated.
- name: createTime
value: string
description: >
The timestamp when the job was initially created. Immutable and set by the Cloud Dataflow service.
- name: replaceJobId
value: string
description: >
If this job is an update of an existing job, this field is the job ID of the job it replaced. When sending a `CreateJobRequest`, you can update a job by specifying it here. The job named here is stopped, and its intermediate state is transferred to this job.
- name: transformNameMapping
value: object
description: >
Optional. The map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job.
- name: clientRequestId
value: string
description: >
The client's unique identifier of the job, re-used across retried attempts. If this field is set, the service will ensure its uniqueness. The request to create a job will fail if the service has knowledge of a previously submitted job with the same client's ID and job name. The caller may use this field to ensure idempotence of job creation across retried attempts to create a job. By default, the field is empty and, in that case, the service ignores it.
- name: replacedByJobId
value: string
description: >
If another job is an update of this job (and thus, this job is in `JOB_STATE_UPDATED`), this field contains the ID of that job.
- name: tempFiles
value: array
description: >
A set of files the system should be aware of that are used for temporary storage. These temporary files will be removed on job completion. No duplicates are allowed. No file patterns are supported. The supported files are: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object}
- name: labels
value: object
description: >
User-defined labels for this job. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size.
- name: location
value: string
description: >
Optional. The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job.
- name: pipelineDescription
value: object
description: >
Preliminary field: The format of this data may change at any time. A description of the user pipeline and stages through which it is executed. Created by Cloud Dataflow service. Only retrieved with JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL.
- name: stageStates
value: array
description: >
This field may be mutated by the Cloud Dataflow service; callers cannot mutate it.
- name: jobMetadata
value: object
description: >
This field is populated by the Dataflow service to support filtering jobs by the metadata values provided here. Populated for ListJobs and all GetJob views SUMMARY and higher.
- name: startTime
value: string
description: >
The timestamp when the job was started (transitioned to JOB_STATE_PENDING). Flexible resource scheduling jobs are started with some delay after job creation, so start_time is unset before start and is updated when the job is started by the Cloud Dataflow service. For other jobs, start_time always equals to create_time and is immutable and set by the Cloud Dataflow service.
- name: createdFromSnapshotId
value: string
description: >
If this is specified, the job's initial state is populated from the given snapshot.
- name: satisfiesPzs
value: boolean
description: >
Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.
- name: runtimeUpdatableParams
value: object
description: >
This field may ONLY be modified at runtime using the projects.jobs.update method to adjust job behavior. This field has no effect when specified at job creation.
- name: view
value: string
- name: replaceJobId
value: string
REPLACE
examples
- projects_locations_jobs_update
- projects_jobs_update
Updates the state of an existing Cloud Dataflow job. To update the state of an existing job, we recommend using projects.locations.jobs.update
with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.update
is not recommended, as you can only update the state of jobs that are running in us-central1
.
REPLACE google.dataflow.jobs
SET
data__id = '{{ id }}',
data__projectId = '{{ projectId }}',
data__name = '{{ name }}',
data__type = '{{ type }}',
data__environment = '{{ environment }}',
data__steps = '{{ steps }}',
data__stepsLocation = '{{ stepsLocation }}',
data__currentState = '{{ currentState }}',
data__currentStateTime = '{{ currentStateTime }}',
data__requestedState = '{{ requestedState }}',
data__executionInfo = '{{ executionInfo }}',
data__createTime = '{{ createTime }}',
data__replaceJobId = '{{ replaceJobId }}',
data__transformNameMapping = '{{ transformNameMapping }}',
data__clientRequestId = '{{ clientRequestId }}',
data__replacedByJobId = '{{ replacedByJobId }}',
data__tempFiles = '{{ tempFiles }}',
data__labels = '{{ labels }}',
data__location = '{{ location }}',
data__pipelineDescription = '{{ pipelineDescription }}',
data__stageStates = '{{ stageStates }}',
data__jobMetadata = '{{ jobMetadata }}',
data__startTime = '{{ startTime }}',
data__createdFromSnapshotId = '{{ createdFromSnapshotId }}',
data__satisfiesPzs = {{ satisfiesPzs }},
data__runtimeUpdatableParams = '{{ runtimeUpdatableParams }}'
WHERE
projectId = '{{ projectId }}' --required
AND location = '{{ location }}' --required
AND jobId = '{{ jobId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
id,
name,
clientRequestId,
createTime,
createdFromSnapshotId,
currentState,
currentStateTime,
environment,
executionInfo,
jobMetadata,
labels,
location,
pipelineDescription,
projectId,
replaceJobId,
replacedByJobId,
requestedState,
runtimeUpdatableParams,
satisfiesPzi,
satisfiesPzs,
serviceResources,
stageStates,
startTime,
steps,
stepsLocation,
tempFiles,
transformNameMapping,
type;
Updates the state of an existing Cloud Dataflow job. To update the state of an existing job, we recommend using projects.locations.jobs.update
with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.update
is not recommended, as you can only update the state of jobs that are running in us-central1
.
REPLACE google.dataflow.jobs
SET
data__id = '{{ id }}',
data__projectId = '{{ projectId }}',
data__name = '{{ name }}',
data__type = '{{ type }}',
data__environment = '{{ environment }}',
data__steps = '{{ steps }}',
data__stepsLocation = '{{ stepsLocation }}',
data__currentState = '{{ currentState }}',
data__currentStateTime = '{{ currentStateTime }}',
data__requestedState = '{{ requestedState }}',
data__executionInfo = '{{ executionInfo }}',
data__createTime = '{{ createTime }}',
data__replaceJobId = '{{ replaceJobId }}',
data__transformNameMapping = '{{ transformNameMapping }}',
data__clientRequestId = '{{ clientRequestId }}',
data__replacedByJobId = '{{ replacedByJobId }}',
data__tempFiles = '{{ tempFiles }}',
data__labels = '{{ labels }}',
data__location = '{{ location }}',
data__pipelineDescription = '{{ pipelineDescription }}',
data__stageStates = '{{ stageStates }}',
data__jobMetadata = '{{ jobMetadata }}',
data__startTime = '{{ startTime }}',
data__createdFromSnapshotId = '{{ createdFromSnapshotId }}',
data__satisfiesPzs = {{ satisfiesPzs }},
data__runtimeUpdatableParams = '{{ runtimeUpdatableParams }}'
WHERE
projectId = '{{ projectId }}' --required
AND jobId = '{{ jobId }}' --required
AND location = '{{ location}}'
AND updateMask = '{{ updateMask}}'
RETURNING
id,
name,
clientRequestId,
createTime,
createdFromSnapshotId,
currentState,
currentStateTime,
environment,
executionInfo,
jobMetadata,
labels,
location,
pipelineDescription,
projectId,
replaceJobId,
replacedByJobId,
requestedState,
runtimeUpdatableParams,
satisfiesPzi,
satisfiesPzs,
serviceResources,
stageStates,
startTime,
steps,
stepsLocation,
tempFiles,
transformNameMapping,
type;
Lifecycle Methods
- projects_jobs_aggregated
- projects_jobs_snapshot
- projects_locations_jobs_snapshot
List the jobs of a project across all regions. Note: This method doesn't support filtering the list of jobs by name.
EXEC google.dataflow.jobs.projects_jobs_aggregated
@projectId='{{ projectId }}' --required,
@filter='{{ filter }}',
@view='{{ view }}',
@pageSize='{{ pageSize }}',
@pageToken='{{ pageToken }}',
@location='{{ location }}',
@name='{{ name }}';
Snapshot the state of a streaming job.
EXEC google.dataflow.jobs.projects_jobs_snapshot
@projectId='{{ projectId }}' --required,
@jobId='{{ jobId }}' --required
@@json=
'{
"ttl": "{{ ttl }}",
"location": "{{ location }}",
"snapshotSources": {{ snapshotSources }},
"description": "{{ description }}"
}';
Snapshot the state of a streaming job.
EXEC google.dataflow.jobs.projects_locations_jobs_snapshot
@projectId='{{ projectId }}' --required,
@location='{{ location }}' --required,
@jobId='{{ jobId }}' --required
@@json=
'{
"ttl": "{{ ttl }}",
"location": "{{ location }}",
"snapshotSources": {{ snapshotSources }},
"description": "{{ description }}"
}';