Launch

Launch a template

22 variables
120 variables

Launch a template

Authorization

To use this building block you will have to grant access to at least one of the following scopes:

  • View and manage your data across Google Cloud Platform services
  • View and manage your Google Compute Engine resources
  • View your Google Compute Engine resources
  • View your email address

Input

This building block consumes 22 input parameters

  = Parameter name
  = Format

projectId STRING Required

Required. The ID of the Cloud Platform project that the job belongs to

location STRING Required

The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request

dynamicTemplate.stagingLocation STRING

Cloud Storage path for staging dependencies. Must be a valid Cloud Storage URL, beginning with gs://

validateOnly BOOLEAN

If true, the request is validated but not actually executed. Defaults to false

gcsPath STRING

A Cloud Storage path to the template from which to create the job. Must be valid Cloud Storage URL, beginning with 'gs://'

dynamicTemplate.gcsPath STRING

Path to dynamic template spec file on GCS. The file must be a Json serialized DynamicTemplateFieSpec object

parameters OBJECT

The runtime parameters to pass to the job

parameters.customKey.value STRING Required

The runtime parameters to pass to the job

jobName STRING

Required. The job name to use for the created job

environment OBJECT

The environment values to set at runtime

environment.numWorkers INTEGER

The initial number of Google Compute Engine instnaces for the job

environment.zone STRING

The Compute Engine availability zone for launching worker instances to run your pipeline

environment.additionalUserLabels OBJECT

Additional user labels to be specified for the job. Keys and values should follow the restrictions specified in the labeling restrictions page

environment.additionalUserLabels.customKey.value STRING Required

Additional user labels to be specified for the job. Keys and values should follow the restrictions specified in the labeling restrictions page

environment.subnetwork STRING

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

environment.additionalExperiments[] STRING

environment.maxWorkers INTEGER

The maximum number of Google Compute Engine instances to be made available to your pipeline during execution, from 1 to 1000

environment.tempLocation STRING

The Cloud Storage path to use for temporary files. Must be a valid Cloud Storage URL, beginning with gs://

environment.serviceAccountEmail STRING

The email address of the service account to run the job as

environment.bypassTempDirValidation BOOLEAN

Whether to bypass the safety checks for the job's temporary directory. Use with caution

environment.machineType STRING

The machine type to use for the job. Defaults to the value from the template if not specified

environment.network STRING

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

Output

This building block provides 120 output parameters

  = Parameter name
  = Format

job OBJECT

Defines a job to be run by the Cloud Dataflow service

job.requestedState ENUMERATION

The job's requested state.

UpdateJob may be used to switch between the JOB_STATE_STOPPED and JOB_STATE_RUNNING states, by setting requested_state. UpdateJob may also be used to directly set a job's requested state to JOB_STATE_CANCELLED or JOB_STATE_DONE, irrevocably terminating the job if it has not already reached a terminal state

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

job.id STRING

The unique ID of this job.

This field is set by the Cloud Dataflow service when the Job is created, and is immutable for the life of the job

job.currentStateTime ANY

The timestamp associated with the current state

job.transformNameMapping OBJECT

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

job.transformNameMapping.customKey.value STRING

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

job.environment OBJECT

Describes the environment in which a Dataflow Job runs

job.environment.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"

job.environment.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 job_name 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 taskrunner_settings. The supported resource type is:

Google Cloud Storage:

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

job.environment.experiments[] STRING

job.environment.version OBJECT

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

job.environment.version.customKey.value ANY

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

job.environment.serviceAccountEmail STRING

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

job.environment.sdkPipelineOptions OBJECT

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

job.environment.sdkPipelineOptions.customKey.value ANY

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

job.environment.flexResourceSchedulingGoal ENUMERATION

Which Flexible Resource Scheduling mode to run in

job.environment.workerPools[] OBJECT

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

job.environment.workerPools[].workerHarnessContainerImage STRING

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

job.environment.workerPools[].machineType STRING

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

job.environment.workerPools[].diskType STRING

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

job.environment.workerPools[].kind STRING

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

job.environment.workerPools[].subnetwork STRING

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

job.environment.workerPools[].ipConfiguration ENUMERATION

Configuration for VM IPs

job.environment.workerPools[].metadata OBJECT

Metadata to set on the Google Compute Engine VMs

job.environment.workerPools[].metadata.customKey.value STRING

Metadata to set on the Google Compute Engine VMs

job.environment.workerPools[].defaultPackageSet ENUMERATION

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

job.environment.workerPools[].network STRING

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

job.environment.workerPools[].zone STRING

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

job.environment.workerPools[].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

job.environment.workerPools[].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)

job.environment.workerPools[].diskSourceImage STRING

Fully qualified source image for disks

job.environment.workerPools[].teardownPolicy ENUMERATION

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

job.environment.workerPools[].onHostMaintenance STRING

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

job.environment.workerPools[].poolArgs OBJECT

Extra arguments for this worker pool

job.environment.workerPools[].poolArgs.customKey.value ANY

Extra arguments for this worker pool

job.environment.workerPools[].diskSizeGb INTEGER

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

job.environment.dataset STRING

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

The supported resource type is:

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

job.environment.internalExperiments OBJECT

Experimental settings

job.environment.internalExperiments.customKey.value ANY

Experimental settings

job.environment.serviceKmsKeyName STRING

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

job.environment.userAgent OBJECT

A description of the process that generated the request

job.environment.userAgent.customKey.value ANY

A description of the process that generated the request

job.stageStates[] OBJECT

A message describing the state of a particular execution stage

job.stageStates[].executionStageName STRING

The name of the execution stage

job.stageStates[].currentStateTime ANY

The time at which the stage transitioned to this state

job.stageStates[].executionStageState ENUMERATION

Executions stage states allow the same set of values as JobState

job.jobMetadata OBJECT

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

job.jobMetadata.datastoreDetails[] OBJECT

Metadata for a Datastore connector used by the job

job.jobMetadata.datastoreDetails[].projectId STRING

ProjectId accessed in the connection

job.jobMetadata.datastoreDetails[].namespace STRING

Namespace used in the connection

job.jobMetadata.sdkVersion OBJECT

The version of the SDK used to run the job

job.jobMetadata.sdkVersion.version STRING

The version of the SDK used to run the job

job.jobMetadata.sdkVersion.versionDisplayName STRING

A readable string describing the version of the SDK

job.jobMetadata.sdkVersion.sdkSupportStatus ENUMERATION

The support status for this SDK version

job.jobMetadata.fileDetails[] OBJECT

Metadata for a File connector used by the job

job.jobMetadata.fileDetails[].filePattern STRING

File Pattern used to access files by the connector

job.jobMetadata.bigqueryDetails[] OBJECT

Metadata for a BigQuery connector used by the job

job.jobMetadata.bigqueryDetails[].dataset STRING

Dataset accessed in the connection

job.jobMetadata.bigqueryDetails[].projectId STRING

Project accessed in the connection

job.jobMetadata.bigqueryDetails[].query STRING

Query used to access data in the connection

job.jobMetadata.bigqueryDetails[].table STRING

Table accessed in the connection

job.jobMetadata.pubsubDetails[] OBJECT

Metadata for a PubSub connector used by the job

job.jobMetadata.pubsubDetails[].topic STRING

Topic accessed in the connection

job.jobMetadata.pubsubDetails[].subscription STRING

Subscription used in the connection

job.jobMetadata.bigTableDetails[] OBJECT

Metadata for a BigTable connector used by the job

job.jobMetadata.bigTableDetails[].instanceId STRING

InstanceId accessed in the connection

job.jobMetadata.bigTableDetails[].tableId STRING

TableId accessed in the connection

job.jobMetadata.bigTableDetails[].projectId STRING

ProjectId accessed in the connection

job.jobMetadata.spannerDetails[] OBJECT

Metadata for a Spanner connector used by the job

job.jobMetadata.spannerDetails[].projectId STRING

ProjectId accessed in the connection

job.jobMetadata.spannerDetails[].databaseId STRING

DatabaseId accessed in the connection

job.jobMetadata.spannerDetails[].instanceId STRING

InstanceId accessed in the connection

job.type ENUMERATION

The type of Cloud Dataflow job

job.projectId STRING

The ID of the Cloud Platform project that the job belongs to

job.createdFromSnapshotId STRING

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

job.pipelineDescription OBJECT

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

job.pipelineDescription.originalPipelineTransform[] OBJECT

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

job.pipelineDescription.originalPipelineTransform[].id STRING

SDK generated id of this transform instance

job.pipelineDescription.originalPipelineTransform[].outputCollectionName[] STRING

job.pipelineDescription.originalPipelineTransform[].kind ENUMERATION

Type of transform

job.pipelineDescription.originalPipelineTransform[].inputCollectionName[] STRING

job.pipelineDescription.originalPipelineTransform[].name STRING

User provided name for this transform instance

job.pipelineDescription.displayData[] OBJECT

Data provided with a pipeline or transform to provide descriptive info

job.pipelineDescription.displayData[].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

job.pipelineDescription.displayData[].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 short_str_value and com.mypackage.MyDoFn as the java_class_name value. short_str_value can be displayed and java_class_name_value will be displayed as a tooltip

job.pipelineDescription.displayData[].label STRING

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

job.pipelineDescription.displayData[].url STRING

An optional full URL

job.pipelineDescription.displayData[].timestampValue ANY

Contains value if the data is of timestamp type

job.pipelineDescription.displayData[].javaClassValue STRING

Contains value if the data is of java class type

job.pipelineDescription.displayData[].boolValue BOOLEAN

Contains value if the data is of a boolean type

job.pipelineDescription.displayData[].strValue STRING

Contains value if the data is of string type

job.pipelineDescription.displayData[].durationValue ANY

Contains value if the data is of duration type

job.pipelineDescription.displayData[].int64Value INTEGER

Contains value if the data is of int64 type

job.pipelineDescription.displayData[].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

job.pipelineDescription.displayData[].floatValue FLOAT

Contains value if the data is of float type

job.pipelineDescription.executionPipelineStage[] OBJECT

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

job.pipelineDescription.executionPipelineStage[].kind ENUMERATION

Type of tranform this stage is executing

job.pipelineDescription.executionPipelineStage[].name STRING

Dataflow service generated name for this stage

job.pipelineDescription.executionPipelineStage[].id STRING

Dataflow service generated id for this stage

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

job.tempFiles[] STRING

job.name STRING

The user-specified Cloud Dataflow job name.

Only one Job with a given name may exist in a project at any given time. If a caller attempts to create a Job with the same name as an already-existing Job, the attempt returns the existing Job.

The name must match the regular expression [a-z]([-a-z0-9]{0,38}[a-z0-9])?

job.steps[] OBJECT

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.

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.

  • 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

job.steps[].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

job.steps[].kind STRING

The kind of step in the Cloud Dataflow job

job.steps[].properties OBJECT

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

job.steps[].properties.customKey.value ANY

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

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

job.executionInfo OBJECT

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

job.executionInfo.stages OBJECT

A mapping from each stage to the information about that stage

job.executionInfo.stages.customKey OBJECT

Add additional named properties

job.executionInfo.stages.customKey.stepName[] STRING

job.currentState ENUMERATION

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 may be mutated by the Cloud Dataflow service; callers cannot mutate it

job.location STRING

The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job

job.startTime ANY

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

job.stepsLocation STRING

The GCS location where the steps are stored

job.createTime ANY

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

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

job.labels.customKey.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}{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.