REST Resource: projects.jobs

Resource: Job

Defines a job to be run by the Cloud Dataflow service. Do not enter confidential information when you supply string values using the API.

JSON representation
{
  "id": string,
  "projectId": string,
  "name": string,
  "type": enum (JobType),
  "environment": {
    object (Environment)
  },
  "steps": [
    {
      object (Step)
    }
  ],
  "stepsLocation": string,
  "currentState": enum (JobState),
  "currentStateTime": string,
  "requestedState": enum (JobState),
  "executionInfo": {
    object (JobExecutionInfo)
  },
  "createTime": string,
  "replaceJobId": string,
  "transformNameMapping": {
    string: string,
    ...
  },
  "clientRequestId": string,
  "replacedByJobId": string,
  "tempFiles": [
    string
  ],
  "labels": {
    string: string,
    ...
  },
  "location": string,
  "pipelineDescription": {
    object (PipelineDescription)
  },
  "stageStates": [
    {
      object (ExecutionStageState)
    }
  ],
  "jobMetadata": {
    object (JobMetadata)
  },
  "startTime": string,
  "createdFromSnapshotId": string,
  "satisfiesPzs": boolean,
  "runtimeUpdatableParams": {
    object (RuntimeUpdatableParams)
  },
  "satisfiesPzi": boolean,
  "serviceResources": {
    object (ServiceResources)
  }
}
Fields
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.

projectId

string

The ID of the Google Cloud project that the job belongs to.

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])?

type

enum (JobType)

Optional. The type of Dataflow job.

environment

object (Environment)

Optional. The environment for the job.

steps[]

object (Step)

Exactly one of step or stepsLocation 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.

currentState

enum (JobState)

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 (Timestamp format)

The timestamp associated with the current state.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

requestedState

enum (JobState)

The job's requested state. Applies to jobs.update requests.

Set requestedState with jobs.update requests to switch between the states JOB_STATE_STOPPED and JOB_STATE_RUNNING. You can also use jobs.update 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 jobs.create requests.

executionInfo

object (JobExecutionInfo)

Deprecated.

createTime

string (Timestamp format)

The timestamp when the job was initially created. Immutable and set by the Cloud Dataflow service.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

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.

transformNameMapping

map (key: string, value: string)

Optional. The map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job.

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.

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.

tempFiles[]

string

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}

labels

map (key: string, value: string)

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}][\p{Ll}\p{Lo}\p{N}_-]{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 that contains this job.

pipelineDescription

object (PipelineDescription)

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.

stageStates[]

object (ExecutionStageState)

This field may be mutated by the Cloud Dataflow service; callers cannot mutate it.

jobMetadata

object (JobMetadata)

This field is populated by the Dataflow service to support filtering jobs by the metadata values provided here. Populated for jobs.list and all jobs.get views SUMMARY and higher.

startTime

string (Timestamp format)

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 startTime is unset before start and is updated when the job is started by the Cloud Dataflow service. For other jobs, startTime always equals to createTime and is immutable and set by the Cloud Dataflow service.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

createdFromSnapshotId

string

If this is specified, the job's initial state is populated from the given snapshot.

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.

runtimeUpdatableParams

object (RuntimeUpdatableParams)

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.

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.

serviceResources

object (ServiceResources)

Output only. Resources used by the Dataflow Service to run the job.

JobType

Specifies the processing model used by a google.dataflow.v1beta3.Job, which determines the way the Job is managed by the Cloud Dataflow service (how workers are scheduled, how inputs are sharded, etc).

Enums
JOB_TYPE_UNKNOWN The type of the job is unspecified, or unknown.
JOB_TYPE_BATCH A batch job with a well-defined end point: data is read, data is processed, data is written, and the job is done.
JOB_TYPE_STREAMING A continuously streaming job with no end: data is read, processed, and written continuously.

Environment

Describes the environment in which a Dataflow Job runs.

JSON representation
{
  "tempStoragePrefix": string,
  "clusterManagerApiService": string,
  "experiments": [
    string
  ],
  "serviceOptions": [
    string
  ],
  "serviceKmsKeyName": string,
  "workerPools": [
    {
      object (WorkerPool)
    }
  ],
  "userAgent": {
    object
  },
  "version": {
    object
  },
  "dataset": string,
  "sdkPipelineOptions": {
    object
  },
  "internalExperiments": {
    "@type": string,
    field1: ...,
    ...
  },
  "serviceAccountEmail": string,
  "flexResourceSchedulingGoal": enum (FlexResourceSchedulingGoal),
  "workerRegion": string,
  "workerZone": string,
  "shuffleMode": enum (ShuffleMode),
  "debugOptions": {
    object (DebugOptions)
  },
  "useStreamingEngineResourceBasedBilling": boolean,
  "streamingMode": enum (StreamingMode)
}
Fields
tempStoragePrefix

string

The prefix of the resources the system should use for temporary storage. The system will append the suffix "/temp-{JOBNAME} to this resource prefix, where {JOBNAME} is the value of the jobName field. The resulting bucket and object prefix is used as the prefix of the resources used to store temporary data needed during the job execution. NOTE: This will override the value in taskrunnerSettings. The supported resource type is:

Google Cloud Storage:

storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object}

clusterManagerApiService

string

The type of cluster manager API to use. If unknown or unspecified, the service will attempt to choose a reasonable default. This should be in the form of the API service name, e.g. "compute.googleapis.com".

experiments[]

string

The list of experiments to enable. This field should be used for SDK related experiments and not for service related experiments. The proper field for service related experiments is serviceOptions.

serviceOptions[]

string

Optional. The list of service options to enable. This field should be used for service related experiments only. These experiments, when graduating to GA, should be replaced by dedicated fields or become default (i.e. always on).

serviceKmsKeyName

string

Optional. If set, contains the Cloud KMS key identifier used to encrypt data at rest, AKA a Customer Managed Encryption Key (CMEK).

Format: projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY

workerPools[]

object (WorkerPool)

The worker pools. At least one "harness" worker pool must be specified in order for the job to have workers.

userAgent

object (Struct format)

A description of the process that generated the request.

version

object (Struct format)

A structure describing which components and their versions of the service are required in order to run the job.

dataset

string

Optional. The dataset for the current project where various workflow related tables are stored.

The supported resource type is:

Google BigQuery: bigquery.googleapis.com/{dataset}

sdkPipelineOptions

object (Struct format)

The Cloud Dataflow SDK pipeline options specified by the user. These options are passed through the service and are used to recreate the SDK pipeline options on the worker in a language agnostic and platform independent way.

internalExperiments

object

Experimental settings.

An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.

serviceAccountEmail

string

Optional. Identity to run virtual machines as. Defaults to the default account.

flexResourceSchedulingGoal

enum (FlexResourceSchedulingGoal)

Optional. Which Flexible Resource Scheduling mode to run in.

workerRegion

string

Optional. The Compute Engine region (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1". Mutually exclusive with workerZone. If neither workerRegion nor workerZone is specified, default to the control plane's region.

workerZone

string

Optional. The Compute Engine zone (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1-a". Mutually exclusive with workerRegion. If neither workerRegion nor workerZone is specified, a zone in the control plane's region is chosen based on available capacity.

shuffleMode

enum (ShuffleMode)

Output only. The shuffle mode used for the job.

debugOptions

object (DebugOptions)

Optional. Any debugging options to be supplied to the job.

useStreamingEngineResourceBasedBilling

boolean

Output only. Whether the job uses the Streaming Engine resource-based billing model.

streamingMode

enum (StreamingMode)

Optional. Specifies the Streaming Engine message processing guarantees. Reduces cost and latency but might result in duplicate messages committed to storage. Designed to run simple mapping streaming ETL jobs at the lowest cost. For example, Change Data Capture (CDC) to BigQuery is a canonical use case. For more information, see Set the pipeline streaming mode.

WorkerPool

Describes one particular pool of Cloud Dataflow workers to be instantiated by the Cloud Dataflow service in order to perform the computations required by a job. Note that a workflow job may use multiple pools, in order to match the various computational requirements of the various stages of the job.

JSON representation
{
  "kind": string,
  "numWorkers": integer,
  "packages": [
    {
      object (Package)
    }
  ],
  "defaultPackageSet": enum (DefaultPackageSet),
  "machineType": string,
  "teardownPolicy": enum (TeardownPolicy),
  "diskSizeGb": integer,
  "diskType": string,
  "diskSourceImage": string,
  "zone": string,
  "taskrunnerSettings": {
    object (TaskRunnerSettings)
  },
  "onHostMaintenance": string,
  "dataDisks": [
    {
      object (Disk)
    }
  ],
  "metadata": {
    string: string,
    ...
  },
  "autoscalingSettings": {
    object (AutoscalingSettings)
  },
  "poolArgs": {
    "@type": string,
    field1: ...,
    ...
  },
  "network": string,
  "subnetwork": string,
  "workerHarnessContainerImage": string,
  "numThreadsPerWorker": integer,
  "ipConfiguration": enum (WorkerIPAddressConfiguration),
  "sdkHarnessContainerImages": [
    {
      object (SdkHarnessContainerImage)
    }
  ]
}
Fields
kind

string

The kind of the worker pool; currently only harness and shuffle are supported.

numWorkers

integer

Number of Google Compute Engine workers in this pool needed to execute the job. If zero or unspecified, the service will attempt to choose a reasonable default.

packages[]

object (Package)

Packages to be installed on workers.

defaultPackageSet

enum (DefaultPackageSet)

The default package set to install. This allows the service to select a default set of packages which are useful to worker harnesses written in a particular language.

machineType

string

Machine type (e.g. "n1-standard-1"). If empty or unspecified, the service will attempt to choose a reasonable default.

teardownPolicy

enum (TeardownPolicy)

Sets the policy for determining when to turndown worker pool. Allowed values are: TEARDOWN_ALWAYS, TEARDOWN_ON_SUCCESS, and TEARDOWN_NEVER. TEARDOWN_ALWAYS means workers are always torn down regardless of whether the job succeeds. TEARDOWN_ON_SUCCESS means workers are torn down if the job succeeds. TEARDOWN_NEVER means the workers are never torn down.

If the workers are not torn down by the service, they will continue to run and use Google Compute Engine VM resources in the user's project until they are explicitly terminated by the user. Because of this, Google recommends using the TEARDOWN_ALWAYS policy except for small, manually supervised test jobs.

If unknown or unspecified, the service will attempt to choose a reasonable default.

diskSizeGb

integer

Size of root disk for VMs, in GB. If zero or unspecified, the service will attempt to choose a reasonable default.

diskType

string

Type of root disk for VMs. If empty or unspecified, the service will attempt to choose a reasonable default.

diskSourceImage

string

Fully qualified source image for disks.

zone

string

Zone to run the worker pools in. If empty or unspecified, the service will attempt to choose a reasonable default.

taskrunnerSettings

object (TaskRunnerSettings)

Settings passed through to Google Compute Engine workers when using the standard Dataflow task runner. Users should ignore this field.

onHostMaintenance

string

The action to take on host maintenance, as defined by the Google Compute Engine API.

dataDisks[]

object (Disk)

Data disks that are used by a VM in this workflow.

metadata

map (key: string, value: string)

Metadata to set on the Google Compute Engine VMs.

autoscalingSettings

object (AutoscalingSettings)

Settings for autoscaling of this WorkerPool.

poolArgs

object

Extra arguments for this worker pool.

An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.

network

string

Network to which VMs will be assigned. If empty or unspecified, the service will use the network "default".

subnetwork

string

Subnetwork to which VMs will be assigned, if desired. Expected to be of the form "regions/REGION/subnetworks/SUBNETWORK".

workerHarnessContainerImage

string

Required. Docker container image that executes the Cloud Dataflow worker harness, residing in Google Container Registry.

Deprecated for the Fn API path. Use sdkHarnessContainerImages instead.

numThreadsPerWorker

integer

The number of threads per worker harness. If empty or unspecified, the service will choose a number of threads (according to the number of cores on the selected machine type for batch, or 1 by convention for streaming).

ipConfiguration

enum (WorkerIPAddressConfiguration)

Configuration for VM IPs.

sdkHarnessContainerImages[]

object (SdkHarnessContainerImage)

Set of SDK harness containers needed to execute this pipeline. This will only be set in the Fn API path. For non-cross-language pipelines this should have only one entry. Cross-language pipelines will have two or more entries.

Package

The packages that must be installed in order for a worker to run the steps of the Cloud Dataflow job that will be assigned to its worker pool.

This is the mechanism by which the Cloud Dataflow SDK causes code to be loaded onto the workers. For example, the Cloud Dataflow Java SDK might use this to install jars containing the user's code and all of the various dependencies (libraries, data files, etc.) required in order for that code to run.

JSON representation
{
  "name": string,
  "location": string
}
Fields
name

string

The name of the package.

location

string

The resource to read the package from. The supported resource type is:

Google Cloud Storage:

storage.googleapis.com/{bucket} bucket.storage.googleapis.com/

DefaultPackageSet

The default set of packages to be staged on a pool of workers.

Enums
DEFAULT_PACKAGE_SET_UNKNOWN The default set of packages to stage is unknown, or unspecified.
DEFAULT_PACKAGE_SET_NONE Indicates that no packages should be staged at the worker unless explicitly specified by the job.
DEFAULT_PACKAGE_SET_JAVA Stage packages typically useful to workers written in Java.
DEFAULT_PACKAGE_SET_PYTHON Stage packages typically useful to workers written in Python.

TeardownPolicy

Specifies what happens to a resource when a Cloud Dataflow google.dataflow.v1beta3.Job has completed.

Enums
TEARDOWN_POLICY_UNKNOWN The teardown policy isn't specified, or is unknown.
TEARDOWN_ALWAYS Always teardown the resource.
TEARDOWN_ON_SUCCESS Teardown the resource on success. This is useful for debugging failures.
TEARDOWN_NEVER Never teardown the resource. This is useful for debugging and development.

TaskRunnerSettings

Taskrunner configuration settings.

JSON representation
{
  "taskUser": string,
  "taskGroup": string,
  "oauthScopes": [
    string
  ],
  "baseUrl": string,
  "dataflowApiVersion": string,
  "parallelWorkerSettings": {
    object (WorkerSettings)
  },
  "baseTaskDir": string,
  "continueOnException": boolean,
  "logToSerialconsole": boolean,
  "alsologtostderr": boolean,
  "logUploadLocation": string,
  "logDir": string,
  "tempStoragePrefix": string,
  "harnessCommand": string,
  "workflowFileName": string,
  "commandlinesFileName": string,
  "vmId": string,
  "languageHint": string,
  "streamingWorkerMainClass": string
}
Fields
taskUser

string

The UNIX user ID on the worker VM to use for tasks launched by taskrunner; e.g. "root".

taskGroup

string

The UNIX group ID on the worker VM to use for tasks launched by taskrunner; e.g. "wheel".

oauthScopes[]

string

The OAuth2 scopes to be requested by the taskrunner in order to access the Cloud Dataflow API.

baseUrl

string

The base URL for the taskrunner to use when accessing Google Cloud APIs.

When workers access Google Cloud APIs, they logically do so via relative URLs. If this field is specified, it supplies the base URL to use for resolving these relative URLs. The normative algorithm used is defined by RFC 1808, "Relative Uniform Resource Locators".

If not specified, the default value is "http://www.googleapis.com/"

dataflowApiVersion

string

The API version of endpoint, e.g. "v1b3"

parallelWorkerSettings

object (WorkerSettings)

The settings to pass to the parallel worker harness.

baseTaskDir

string

The location on the worker for task-specific subdirectories.

continueOnException

boolean

Whether to continue taskrunner if an exception is hit.

logToSerialconsole

boolean

Whether to send taskrunner log info to Google Compute Engine VM serial console.

alsologtostderr

boolean

Whether to also send taskrunner log info to stderr.

logUploadLocation

string

Indicates where to put logs. If this is not specified, the logs will not be uploaded.

The supported resource type is:

Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object}

logDir

string

The directory on the VM to store logs.

tempStoragePrefix

string

The prefix of the resources the taskrunner should use for temporary storage.

The supported resource type is:

Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object}

harnessCommand

string

The command to launch the worker harness.

workflowFileName

string

The file to store the workflow in.

commandlinesFileName

string

The file to store preprocessing commands in.

vmId

string

The ID string of the VM.

languageHint

string

The suggested backend language.

streamingWorkerMainClass

string

The streaming worker main class name.

WorkerSettings

Provides data to pass through to the worker harness.

JSON representation
{
  "baseUrl": string,
  "reportingEnabled": boolean,
  "servicePath": string,
  "shuffleServicePath": string,
  "workerId": string,
  "tempStoragePrefix": string
}
Fields
baseUrl

string

The base URL for accessing Google Cloud APIs.

When workers access Google Cloud APIs, they logically do so via relative URLs. If this field is specified, it supplies the base URL to use for resolving these relative URLs. The normative algorithm used is defined by RFC 1808, "Relative Uniform Resource Locators".

If not specified, the default value is "http://www.googleapis.com/"

reportingEnabled

boolean

Whether to send work progress updates to the service.

servicePath

string

The Cloud Dataflow service path relative to the root URL, for example, "dataflow/v1b3/projects".

shuffleServicePath

string

The Shuffle service path relative to the root URL, for example, "shuffle/v1beta1".

workerId

string

The ID of the worker running this pipeline.

tempStoragePrefix

string

The prefix of the resources the system should use for temporary storage.

The supported resource type is:

Google Cloud Storage:

storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object}

Disk

Describes the data disk used by a workflow job.

JSON representation
{
  "sizeGb": integer,
  "diskType": string,
  "mountPoint": string
}
Fields
sizeGb

integer

Size of disk in GB. If zero or unspecified, the service will attempt to choose a reasonable default.

diskType

string

Disk storage type, as defined by Google Compute Engine. This must be a disk type appropriate to the project and zone in which the workers will run. If unknown or unspecified, the service will attempt to choose a reasonable default.

For example, the standard persistent disk type is a resource name typically ending in "pd-standard". If SSD persistent disks are available, the resource name typically ends with "pd-ssd". The actual valid values are defined the Google Compute Engine API, not by the Cloud Dataflow API; consult the Google Compute Engine documentation for more information about determining the set of available disk types for a particular project and zone.

Google Compute Engine Disk types are local to a particular project in a particular zone, and so the resource name will typically look something like this:

compute.googleapis.com/projects/project-id/zones/zone/diskTypes/pd-standard

mountPoint

string

Directory in a VM where disk is mounted.

AutoscalingSettings

Settings for WorkerPool autoscaling.

JSON representation
{
  "algorithm": enum (AutoscalingAlgorithm),
  "maxNumWorkers": integer
}
Fields
algorithm

enum (AutoscalingAlgorithm)

The algorithm to use for autoscaling.

maxNumWorkers

integer

The maximum number of workers to cap scaling at.

AutoscalingAlgorithm

Specifies the algorithm used to determine the number of worker processes to run at any given point in time, based on the amount of data left to process, the number of workers, and how quickly existing workers are processing data.

Enums
AUTOSCALING_ALGORITHM_UNKNOWN The algorithm is unknown, or unspecified.
AUTOSCALING_ALGORITHM_NONE Disable autoscaling.
AUTOSCALING_ALGORITHM_BASIC Increase worker count over time to reduce job execution time.

WorkerIPAddressConfiguration

Specifies how to allocate IP addresses to worker machines. You can also use pipeline options to specify whether Dataflow workers use external IP addresses.

Enums
WORKER_IP_UNSPECIFIED The configuration is unknown, or unspecified.
WORKER_IP_PUBLIC Workers should have public IP addresses.
WORKER_IP_PRIVATE Workers should have private IP addresses.

SdkHarnessContainerImage

Defines an SDK harness container for executing Dataflow pipelines.

JSON representation
{
  "containerImage": string,
  "useSingleCorePerContainer": boolean,
  "environmentId": string,
  "capabilities": [
    string
  ]
}
Fields
containerImage

string

A docker container image that resides in Google Container Registry.

useSingleCorePerContainer

boolean

If true, recommends the Dataflow service to use only one core per SDK container instance with this image. If false (or unset) recommends using more than one core per SDK container instance with this image for efficiency. Note that Dataflow service may choose to override this property if needed.

environmentId

string

Environment ID for the Beam runner API proto Environment that corresponds to the current SDK Harness.

capabilities[]

string

The set of capabilities enumerated in the above Environment proto. See also beam_runner_api.proto

FlexResourceSchedulingGoal

Specifies the resource to optimize for in Flexible Resource Scheduling.

Enums
FLEXRS_UNSPECIFIED Run in the default mode.
FLEXRS_SPEED_OPTIMIZED Optimize for lower execution time.
FLEXRS_COST_OPTIMIZED Optimize for lower cost.

ShuffleMode

Specifies the shuffle mode used by a google.dataflow.v1beta3.Job, which determines the approach data is shuffled during processing. More details in: https://cloud.google.com/dataflow/docs/guides/deploying-a-pipeline#dataflow-shuffle

Enums
SHUFFLE_MODE_UNSPECIFIED Shuffle mode information is not available.
VM_BASED Shuffle is done on the worker VMs.
SERVICE_BASED Shuffle is done on the service side.

DebugOptions

Describes any options that have an effect on the debugging of pipelines.

JSON representation
{
  "enableHotKeyLogging": boolean,
  "dataSampling": {
    object (DataSamplingConfig)
  }
}
Fields
enableHotKeyLogging

boolean

Optional. When true, enables the logging of the literal hot key to the user's Cloud Logging.

dataSampling

object (DataSamplingConfig)

Configuration options for sampling elements from a running pipeline.

DataSamplingConfig

Configuration options for sampling elements.

JSON representation
{
  "behaviors": [
    enum (DataSamplingBehavior)
  ]
}
Fields
behaviors[]

enum (DataSamplingBehavior)

List of given sampling behaviors to enable. For example, specifying behaviors = [ALWAYS_ON] samples in-flight elements but does not sample exceptions. Can be used to specify multiple behaviors like, behaviors = [ALWAYS_ON, EXCEPTIONS] for specifying periodic sampling and exception sampling.

If DISABLED is in the list, then sampling will be disabled and ignore the other given behaviors.

Ordering does not matter.

DataSamplingBehavior

The following enum defines what to sample for a running job.

Enums
DATA_SAMPLING_BEHAVIOR_UNSPECIFIED If given, has no effect on sampling behavior. Used as an unknown or unset sentinel value.
DISABLED When given, disables element sampling. Has same behavior as not setting the behavior.
ALWAYS_ON When given, enables sampling in-flight from all PCollections.
EXCEPTIONS When given, enables sampling input elements when a user-defined DoFn causes an exception.

StreamingMode

Specifies the Streaming Engine message processing guarantees. Reduces cost and latency but might result in duplicate messages written to storage. Designed to run simple mapping streaming ETL jobs at the lowest cost. For example, Change Data Capture (CDC) to BigQuery is a canonical use case. For more information, see Set the pipeline streaming mode.

Enums
STREAMING_MODE_UNSPECIFIED Run in the default mode.
STREAMING_MODE_EXACTLY_ONCE In this mode, message deduplication is performed against persistent state to make sure each message is processed and committed to storage exactly once.
STREAMING_MODE_AT_LEAST_ONCE Message deduplication is not performed. Messages might be processed multiple times, and the results are applied multiple times. Note: Setting this value also enables Streaming Engine and Streaming Engine resource-based billing.

Step

Defines a particular step within a Cloud Dataflow job.

A job consists of multiple steps, each of which performs some specific operation as part of the overall job. Data is typically passed from one step to another as part of the job.

Note: The properties of this object are not stable and might change.

Here's an example of a sequence of steps which together implement a Map-Reduce job:

  • Read a collection of data from some source, parsing the collection's elements.

  • sql.validate the elements.

  • Apply a user-defined function to map each element to some value and extract an element-specific key value.

  • Group elements with the same key into a single element with that key, transforming a multiply-keyed collection into a uniquely-keyed collection.

  • Write the elements out to some data sink.

Note that the Cloud Dataflow service may be used to run many different types of jobs, not just Map-Reduce.

JSON representation
{
  "kind": string,
  "name": string,
  "properties": {
    object
  }
}
Fields
kind

string

The kind of step in the Cloud Dataflow job.

name

string

The name that identifies the step. This must be unique for each step with respect to all other steps in the Cloud Dataflow job.

properties

object (Struct format)

Named properties associated with the step. Each kind of predefined step has its own required set of properties. Must be provided on Create. Only retrieved with JOB_VIEW_ALL.

JobState

Describes the overall state of a google.dataflow.v1beta3.Job.

Enums
JOB_STATE_UNKNOWN The job's run state isn't specified.
JOB_STATE_STOPPED JOB_STATE_STOPPED indicates that the job has not yet started to run.
JOB_STATE_RUNNING JOB_STATE_RUNNING indicates that the job is currently running.
JOB_STATE_DONE JOB_STATE_DONE indicates that the job has successfully completed. This is a terminal job state. This state may be set by the Cloud Dataflow service, as a transition from JOB_STATE_RUNNING. It may also be set via a Cloud Dataflow jobs.update call, if the job has not yet reached a terminal state.
JOB_STATE_FAILED JOB_STATE_FAILED indicates that the job has failed. This is a terminal job state. This state may only be set by the Cloud Dataflow service, and only as a transition from JOB_STATE_RUNNING.
JOB_STATE_CANCELLED JOB_STATE_CANCELLED indicates that the job has been explicitly cancelled. This is a terminal job state. This state may only be set via a Cloud Dataflow jobs.update call, and only if the job has not yet reached another terminal state.
JOB_STATE_UPDATED JOB_STATE_UPDATED indicates that the job was successfully updated, meaning that this job was stopped and another job was started, inheriting state from this one. This is a terminal job state. This state may only be set by the Cloud Dataflow service, and only as a transition from JOB_STATE_RUNNING.
JOB_STATE_DRAINING JOB_STATE_DRAINING indicates that the job is in the process of draining. A draining job has stopped pulling from its input sources and is processing any data that remains in-flight. This state may be set via a Cloud Dataflow jobs.update call, but only as a transition from JOB_STATE_RUNNING. Jobs that are draining may only transition to JOB_STATE_DRAINED, JOB_STATE_CANCELLED, or JOB_STATE_FAILED.
JOB_STATE_DRAINED JOB_STATE_DRAINED indicates that the job has been drained. A drained job terminated by stopping pulling from its input sources and processing any data that remained in-flight when draining was requested. This state is a terminal state, may only be set by the Cloud Dataflow service, and only as a transition from JOB_STATE_DRAINING.
JOB_STATE_PENDING JOB_STATE_PENDING indicates that the job has been created but is not yet running. Jobs that are pending may only transition to JOB_STATE_RUNNING, or JOB_STATE_FAILED.
JOB_STATE_CANCELLING JOB_STATE_CANCELLING indicates that the job has been explicitly cancelled and is in the process of stopping. Jobs that are cancelling may only transition to JOB_STATE_CANCELLED or JOB_STATE_FAILED.
JOB_STATE_QUEUED JOB_STATE_QUEUED indicates that the job has been created but is being delayed until launch. Jobs that are queued may only transition to JOB_STATE_PENDING or JOB_STATE_CANCELLED.
JOB_STATE_RESOURCE_CLEANING_UP JOB_STATE_RESOURCE_CLEANING_UP indicates that the batch job's associated resources are currently being cleaned up after a successful run. Currently, this is an opt-in feature, please reach out to Cloud support team if you are interested.

JobExecutionInfo

Additional information about how a Cloud Dataflow job will be executed that isn't contained in the submitted job.

JSON representation
{
  "stages": {
    string: {
      object (JobExecutionStageInfo)
    },
    ...
  }
}
Fields
stages

map (key: string, value: object (JobExecutionStageInfo))

A mapping from each stage to the information about that stage.

JobExecutionStageInfo

Contains information about how a particular google.dataflow.v1beta3.Step will be executed.

JSON representation
{
  "stepName": [
    string
  ]
}
Fields
stepName[]

string

The steps associated with the execution stage. Note that stages may have several steps, and that a given step might be run by more than one stage.

PipelineDescription

A descriptive representation of submitted pipeline as well as the executed form. This data is provided by the Dataflow service for ease of visualizing the pipeline and interpreting Dataflow provided metrics.

JSON representation
{
  "originalPipelineTransform": [
    {
      object (TransformSummary)
    }
  ],
  "executionPipelineStage": [
    {
      object (ExecutionStageSummary)
    }
  ],
  "displayData": [
    {
      object (DisplayData)
    }
  ],
  "stepNamesHash": string
}
Fields
originalPipelineTransform[]

object (TransformSummary)

Description of each transform in the pipeline and collections between them.

executionPipelineStage[]

object (ExecutionStageSummary)

Description of each stage of execution of the pipeline.

displayData[]

object (DisplayData)

Pipeline level display data.

stepNamesHash

string

A hash value of the submitted pipeline portable graph step names if exists.

TransformSummary

Description of the type, names/ids, and input/outputs for a transform.

JSON representation
{
  "kind": enum (KindType),
  "id": string,
  "name": string,
  "displayData": [
    {
      object (DisplayData)
    }
  ],
  "outputCollectionName": [
    string
  ],
  "inputCollectionName": [
    string
  ]
}
Fields
kind

enum (KindType)

Type of transform.

id

string

SDK generated id of this transform instance.

name

string

User provided name for this transform instance.

displayData[]

object (DisplayData)

Transform-specific display data.

outputCollectionName[]

string

User names for all collection outputs to this transform.

inputCollectionName[]

string

User names for all collection inputs to this transform.

KindType

Type of transform or stage operation.

Enums
UNKNOWN_KIND Unrecognized transform type.
PAR_DO_KIND ParDo transform.
GROUP_BY_KEY_KIND Group By Key transform.
FLATTEN_KIND Flatten transform.
READ_KIND Read transform.
WRITE_KIND Write transform.
CONSTANT_KIND Constructs from a constant value, such as with Create.of.
SINGLETON_KIND Creates a Singleton view of a collection.
SHUFFLE_KIND Opening or closing a shuffle session, often as part of a GroupByKey.

DisplayData

Data provided with a pipeline or transform to provide descriptive info.

JSON representation
{
  "key": string,
  "namespace": string,
  "shortStrValue": string,
  "url": string,
  "label": string,

  // Union field Value can be only one of the following:
  "strValue": string,
  "int64Value": string,
  "floatValue": number,
  "javaClassValue": string,
  "timestampValue": string,
  "durationValue": string,
  "boolValue": boolean
  // End of list of possible types for union field Value.
}
Fields
key

string

The key identifying the display data. This is intended to be used as a label for the display data when viewed in a dax monitoring system.

namespace

string

The namespace for the key. This is usually a class name or programming language namespace (i.e. python module) which defines the display data. This allows a dax monitoring system to specially handle the data and perform custom rendering.

shortStrValue

string

A possible additional shorter value to display. For example a java_class_name_value of com.mypackage.MyDoFn will be stored with MyDoFn as the shortStrValue and com.mypackage.MyDoFn as the java_class_name value. shortStrValue can be displayed and java_class_name_value will be displayed as a tooltip.

url

string

An optional full URL.

label

string

An optional label to display in a dax UI for the element.

Union field Value. Various value types which can be used for display data. Only one will be set. Value can be only one of the following:
strValue

string

Contains value if the data is of string type.

int64Value

string (int64 format)

Contains value if the data is of int64 type.

floatValue

number

Contains value if the data is of float type.

javaClassValue

string

Contains value if the data is of java class type.

timestampValue

string (Timestamp format)

Contains value if the data is of timestamp type.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

durationValue

string (Duration format)

Contains value if the data is of duration type.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

boolValue

boolean

Contains value if the data is of a boolean type.

ExecutionStageSummary

Description of the composing transforms, names/ids, and input/outputs of a stage of execution. Some composing transforms and sources may have been generated by the Dataflow service during execution planning.

JSON representation
{
  "name": string,
  "id": string,
  "kind": enum (KindType),
  "inputSource": [
    {
      object (StageSource)
    }
  ],
  "outputSource": [
    {
      object (StageSource)
    }
  ],
  "prerequisiteStage": [
    string
  ],
  "componentTransform": [
    {
      object (ComponentTransform)
    }
  ],
  "componentSource": [
    {
      object (ComponentSource)
    }
  ]
}
Fields
name

string

Dataflow service generated name for this stage.

id

string

Dataflow service generated id for this stage.

kind

enum (KindType)

Type of transform this stage is executing.

inputSource[]

object (StageSource)

Input sources for this stage.

outputSource[]

object (StageSource)

Output sources for this stage.

prerequisiteStage[]

string

Other stages that must complete before this stage can run.

componentTransform[]

object (ComponentTransform)

Transforms that comprise this execution stage.

componentSource[]

object (ComponentSource)

Collections produced and consumed by component transforms of this stage.

StageSource

Description of an input or output of an execution stage.

JSON representation
{
  "userName": string,
  "name": string,
  "originalTransformOrCollection": string,
  "sizeBytes": string
}
Fields
userName

string

Human-readable name for this source; may be user or system generated.

name

string

Dataflow service generated name for this source.

originalTransformOrCollection

string

User name for the original user transform or collection with which this source is most closely associated.

sizeBytes

string (int64 format)

Size of the source, if measurable.

ComponentTransform

Description of a transform executed as part of an execution stage.

JSON representation
{
  "userName": string,
  "name": string,
  "originalTransform": string
}
Fields
userName

string

Human-readable name for this transform; may be user or system generated.

name

string

Dataflow service generated name for this source.

originalTransform

string

User name for the original user transform with which this transform is most closely associated.

ComponentSource

Description of an interstitial value between transforms in an execution stage.

JSON representation
{
  "userName": string,
  "name": string,
  "originalTransformOrCollection": string
}
Fields
userName

string

Human-readable name for this transform; may be user or system generated.

name

string

Dataflow service generated name for this source.

originalTransformOrCollection

string

User name for the original user transform or collection with which this source is most closely associated.

ExecutionStageState

A message describing the state of a particular execution stage.

JSON representation
{
  "executionStageName": string,
  "executionStageState": enum (JobState),
  "currentStateTime": string
}
Fields
executionStageName

string

The name of the execution stage.

executionStageState

enum (JobState)

Executions stage states allow the same set of values as JobState.

currentStateTime

string (Timestamp format)

The time at which the stage transitioned to this state.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

JobMetadata

Metadata available primarily for filtering jobs. Will be included in the ListJob response and Job SUMMARY view.

JSON representation
{
  "sdkVersion": {
    object (SdkVersion)
  },
  "spannerDetails": [
    {
      object (SpannerIODetails)
    }
  ],
  "bigqueryDetails": [
    {
      object (BigQueryIODetails)
    }
  ],
  "bigTableDetails": [
    {
      object (BigTableIODetails)
    }
  ],
  "pubsubDetails": [
    {
      object (PubSubIODetails)
    }
  ],
  "fileDetails": [
    {
      object (FileIODetails)
    }
  ],
  "datastoreDetails": [
    {
      object (DatastoreIODetails)
    }
  ],
  "userDisplayProperties": {
    string: string,
    ...
  }
}
Fields
sdkVersion

object (SdkVersion)

The SDK version used to run the job.

spannerDetails[]

object (SpannerIODetails)

Identification of a Spanner source used in the Dataflow job.

bigqueryDetails[]

object (BigQueryIODetails)

Identification of a BigQuery source used in the Dataflow job.

bigTableDetails[]

object (BigTableIODetails)

Identification of a Cloud Bigtable source used in the Dataflow job.

pubsubDetails[]

object (PubSubIODetails)

Identification of a Pub/Sub source used in the Dataflow job.

fileDetails[]

object (FileIODetails)

Identification of a File source used in the Dataflow job.

datastoreDetails[]

object (DatastoreIODetails)

Identification of a Datastore source used in the Dataflow job.

userDisplayProperties

map (key: string, value: string)

List of display properties to help UI filter jobs.

SdkVersion

The version of the SDK used to run the job.

JSON representation
{
  "version": string,
  "versionDisplayName": string,
  "sdkSupportStatus": enum (SdkSupportStatus),
  "bugs": [
    {
      object (SdkBug)
    }
  ]
}
Fields
version

string

The version of the SDK used to run the job.

versionDisplayName

string

A readable string describing the version of the SDK.

sdkSupportStatus

enum (SdkSupportStatus)

The support status for this SDK version.

bugs[]

object (SdkBug)

Output only. Known bugs found in this SDK version.

SdkSupportStatus

The support status of the SDK used to run the job.

Enums
UNKNOWN Cloud Dataflow is unaware of this version.
SUPPORTED This is a known version of an SDK, and is supported.
STALE A newer version of the SDK family exists, and an update is recommended.
DEPRECATED This version of the SDK is deprecated and will eventually be unsupported.
UNSUPPORTED Support for this SDK version has ended and it should no longer be used.

SdkBug

A bug found in the Dataflow SDK.

JSON representation
{
  "type": enum (Type),
  "severity": enum (Severity),
  "uri": string
}
Fields
type

enum (Type)

Output only. Describes the impact of this SDK bug.

severity

enum (Severity)

Output only. How severe the SDK bug is.

uri

string

Output only. Link to more information on the bug.

Type

Nature of the issue, ordered from least severe to most. Other bug types may be added to this list in the future.

Enums
TYPE_UNSPECIFIED Unknown issue with this SDK.
GENERAL Catch-all for SDK bugs that don't fit in the below categories.
PERFORMANCE Using this version of the SDK may result in degraded performance.
DATALOSS Using this version of the SDK may cause data loss.

Severity

Indicates the severity of the bug. Other severities may be added to this list in the future.

Enums
SEVERITY_UNSPECIFIED A bug of unknown severity.
NOTICE A minor bug that that may reduce reliability or performance for some jobs. Impact will be minimal or non-existent for most jobs.
WARNING A bug that has some likelihood of causing performance degradation, data loss, or job failures.
SEVERE A bug with extremely significant impact. Jobs may fail erroneously, performance may be severely degraded, and data loss may be very likely.

SpannerIODetails

Metadata for a Spanner connector used by the job.

JSON representation
{
  "projectId": string,
  "instanceId": string,
  "databaseId": string
}
Fields
projectId

string

ProjectId accessed in the connection.

instanceId

string

InstanceId accessed in the connection.

databaseId

string

DatabaseId accessed in the connection.

BigQueryIODetails

Metadata for a BigQuery connector used by the job.

JSON representation
{
  "table": string,
  "dataset": string,
  "projectId": string,
  "query": string
}
Fields
table

string

Table accessed in the connection.

dataset

string

Dataset accessed in the connection.

projectId

string

Project accessed in the connection.

query

string

Query used to access data in the connection.

BigTableIODetails

Metadata for a Cloud Bigtable connector used by the job.

JSON representation
{
  "projectId": string,
  "instanceId": string,
  "tableId": string
}
Fields
projectId

string

ProjectId accessed in the connection.

instanceId

string

InstanceId accessed in the connection.

tableId

string

TableId accessed in the connection.

PubSubIODetails

Metadata for a Pub/Sub connector used by the job.

JSON representation
{
  "topic": string,
  "subscription": string
}
Fields
topic

string

Topic accessed in the connection.

subscription

string

Subscription used in the connection.

FileIODetails

Metadata for a File connector used by the job.

JSON representation
{
  "filePattern": string
}
Fields
filePattern

string

File Pattern used to access files by the connector.

DatastoreIODetails

Metadata for a Datastore connector used by the job.

JSON representation
{
  "namespace": string,
  "projectId": string
}
Fields
namespace

string

Namespace used in the connection.

projectId

string

ProjectId accessed in the connection.

RuntimeUpdatableParams

Additional job parameters that can only be updated during runtime using the projects.jobs.update method. These fields have no effect when specified during job creation.

JSON representation
{
  "maxNumWorkers": integer,
  "minNumWorkers": integer,
  "workerUtilizationHint": number
}
Fields
maxNumWorkers

integer

The maximum number of workers to cap autoscaling at. This field is currently only supported for Streaming Engine jobs.

minNumWorkers

integer

The minimum number of workers to scale down to. This field is currently only supported for Streaming Engine jobs.

workerUtilizationHint

number

Target worker utilization, compared against the aggregate utilization of the worker pool by autoscaler, to determine upscaling and downscaling when absent other constraints such as backlog. For more information, see Update an existing pipeline.

ServiceResources

Resources used by the Dataflow Service to run the job.

JSON representation
{
  "zones": [
    string
  ]
}
Fields
zones[]

string

Output only. List of Cloud Zones being used by the Dataflow Service for this job. Example: us-central1-c

Methods

aggregated

List the jobs of a project across all regions.

create

Creates a Cloud Dataflow job.

get

Gets the state of the specified Cloud Dataflow job.

getMetrics

Request the job status.

list

List the jobs of a project.

snapshot

Snapshot the state of a streaming job.

update

Updates the state of an existing Cloud Dataflow job.