DataflowFlexTemplateJob


Property Value
Google Cloud Service Name Cloud Dataflow
Google Cloud Service Documentation /dataflow/docs/
Google Cloud REST Resource Name v1b3.projects.jobs
Google Cloud REST Resource Documentation /dataflow/docs/reference/rest/v1b3/projects.jobs
Config Connector Resource Short Names gcpdataflowflextemplatejob
gcpdataflowflextemplatejobs
dataflowflextemplatejob
Config Connector Service Name dataflow.googleapis.com
Config Connector Resource Fully Qualified Name dataflowflextemplatejobs.dataflow.cnrm.cloud.google.com
Can Be Referenced by IAMPolicy/IAMPolicyMember No
Config Connector Default Average Reconcile Interval In Seconds 600

Custom Resource Definition Properties

Annotations

Fields
cnrm.cloud.google.com/on-delete
cnrm.cloud.google.com/project-id
cnrm.cloud.google.com/skip-wait-on-job-termination
cnrm.cloud.google.com/state-into-spec

Spec

Schema

additionalExperiments:
- string
autoscalingAlgorithm: string
containerSpecGcsPath: string
enableStreamingEngine: boolean
ipConfiguration: string
kmsKeyNameRef:
  external: string
  name: string
  namespace: string
launcherMachineType: string
machineType: string
maxWorkers: integer
networkRef:
  external: string
  name: string
  namespace: string
numWorkers: integer
parameters: {}
region: string
sdkContainerImage: string
serviceAccountEmailRef:
  external: string
  name: string
  namespace: string
stagingLocation: string
subnetworkRef:
  external: string
  name: string
  namespace: string
tempLocation: string
transformNameMapping: {}
Fields

additionalExperiments

Optional

list (string)

List of experiments that should be used by the job. An example value is ["enable_stackdriver_agent_metrics"].

additionalExperiments[]

Optional

string

autoscalingAlgorithm

Optional

string

The algorithm to use for autoscaling.

containerSpecGcsPath

Required

string

enableStreamingEngine

Optional

boolean

Immutable. Indicates if the job should use the streaming engine feature.

ipConfiguration

Optional

string

The configuration for VM IPs. Options are "WORKER_IP_PUBLIC" or "WORKER_IP_PRIVATE".

kmsKeyNameRef

Optional

object

The name for the Cloud KMS key for the job.

kmsKeyNameRef.external

Optional

string

Allowed value: The `selfLink` field of a `KMSCryptoKey` resource.

kmsKeyNameRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

kmsKeyNameRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

launcherMachineType

Optional

string

The machine type to use for launching the job. The default is n1-standard-1.

machineType

Optional

string

The machine type to use for the job.

maxWorkers

Optional

integer

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

networkRef

Optional

object

networkRef.external

Optional

string

Allowed value: The `selfLink` field of a `ComputeNetwork` resource.

networkRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

networkRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

numWorkers

Optional

integer

Immutable. The initial number of Google Compute Engine instances for the job.

parameters

Optional

object

region

Optional

string

Immutable. The region in which the created job should run.

sdkContainerImage

Optional

string

Docker registry location of container image to use for the 'worker harness. Default is the container for the version of the SDK. Note this field is only valid for portable pipelines.

serviceAccountEmailRef

Optional

object

serviceAccountEmailRef.external

Optional

string

Allowed value: The `email` field of an `IAMServiceAccount` resource.

serviceAccountEmailRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

serviceAccountEmailRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

stagingLocation

Optional

string

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

subnetworkRef

Optional

object

subnetworkRef.external

Optional

string

Allowed value: The `selfLink` field of a `ComputeSubnetwork` resource.

subnetworkRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

subnetworkRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

tempLocation

Optional

string

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

transformNameMapping

Optional

object

Only applicable when updating a pipeline. Map of transform name prefixes of the job to be replaced with the corresponding name prefixes of the new job.

Status

Schema

conditions:
- lastTransitionTime: string
  message: string
  reason: string
  status: string
  type: string
jobId: string
observedGeneration: integer
state: string
type: string
Fields
conditions

list (object)

Conditions represent the latest available observation of the resource's current state.

conditions[]

object

conditions[].lastTransitionTime

string

Last time the condition transitioned from one status to another.

conditions[].message

string

Human-readable message indicating details about last transition.

conditions[].reason

string

Unique, one-word, CamelCase reason for the condition's last transition.

conditions[].status

string

Status is the status of the condition. Can be True, False, Unknown.

conditions[].type

string

Type is the type of the condition.

jobId

string

observedGeneration

integer

ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource.

state

string

type

string

The type of this job, selected from the JobType enum.

Sample YAML(s)

Batch Dataflow Flex Template Job

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: dataflow.cnrm.cloud.google.com/v1beta1
kind: DataflowFlexTemplateJob
metadata:
  annotations:
    cnrm.cloud.google.com/on-delete: "cancel"
  name: dataflowflextemplatejob-sample-batch
spec:
  region: us-central1
  # This is a public, Google-maintained Dataflow Job flex template of a batch job
  containerSpecGcsPath: gs://dataflow-templates/2022-10-03-00_RC00/flex/File_Format_Conversion
  parameters:
    inputFileFormat: csv
    outputFileFormat: avro
    # This is a public, Google-maintained csv file expressly for this sample.
    inputFileSpec: gs://config-connector-samples/dataflowflextemplate/numbertest.csv
    # Replace ${PROJECT_ID?} with your project ID.
    outputBucket: gs://${PROJECT_ID?}-dataflowflextemplatejob-dep-batch
    # This is a public, Google-maintained Avro schema file expressly for this sample.
    schema: gs://config-connector-samples/dataflowflextemplate/numbers.avsc
---
apiVersion: storage.cnrm.cloud.google.com/v1beta1
kind: StorageBucket
metadata:
  # StorageBucket names must be globally unique. Replace ${PROJECT_ID?} with your project ID.
  name: ${PROJECT_ID?}-dataflowflextemplatejob-dep-batch

Streaming Dataflow Flex Template Job

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: dataflow.cnrm.cloud.google.com/v1beta1
kind: DataflowFlexTemplateJob
metadata:
  annotations:
    cnrm.cloud.google.com/on-delete: "drain"
  name: dataflowflextemplatejob-sample-streaming
spec:
  region: us-central1
  # This is a public, Google-maintained Dataflow Job flex template of a streaming job
  containerSpecGcsPath: gs://dataflow-templates/2020-08-31-00_RC00/flex/PubSub_Avro_to_BigQuery
  parameters:
    # This is a public, Google-maintained Avro schema file expressly for this sample.
    schemaPath: gs://config-connector-samples/dataflowflextemplate/numbers.avsc
    # Replace ${PROJECT_ID?} with your project ID.
    inputSubscription: projects/${PROJECT_ID?}/subscriptions/dataflowflextemplatejob-dep-streaming
    outputTopic: projects/${PROJECT_ID?}/topics/dataflowflextemplatejob-dep1-streaming
    outputTableSpec: ${PROJECT_ID?}:dataflowflextemplatejobdepstreaming.dataflowflextemplatejobdepstreaming
    createDisposition: CREATE_NEVER
---
apiVersion: bigquery.cnrm.cloud.google.com/v1beta1
kind: BigQueryDataset
metadata:
  name: dataflowflextemplatejobdepstreaming
---
apiVersion: bigquery.cnrm.cloud.google.com/v1beta1
kind: BigQueryTable
metadata:
  name: dataflowflextemplatejobdepstreaming
spec:
  datasetRef:
    name: dataflowflextemplatejobdepstreaming
---
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubSubscription
metadata:
  name: dataflowflextemplatejob-dep-streaming
spec:
  topicRef:
    name: dataflowflextemplatejob-dep0-streaming
---
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubTopic
metadata:
  name: dataflowflextemplatejob-dep0-streaming
---
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubTopic
metadata:
  name: dataflowflextemplatejob-dep1-streaming