Skip to main content

templates

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

Overview

Nametemplates
TypeResource
Idgoogle.dataflow.templates

Fields

NameDatatypeDescription
metadataobjectMetadata describing a template.
runtimeMetadataobjectRuntimeMetadata describing a runtime environment.
statusobjectThe Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
templateTypestringTemplate Type.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_templates_getSELECTlocation, projectIdGet the template associated with a template. To get the template, we recommend using projects.locations.templates.get with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.templates.get is not recommended, because only templates that are running in us-central1 are retrieved.
projects_templates_getSELECTprojectIdGet the template associated with a template. To get the template, we recommend using projects.locations.templates.get with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.templates.get is not recommended, because only templates that are running in us-central1 are retrieved.
projects_locations_templates_createINSERTlocation, projectIdCreates a Cloud Dataflow job from a template. Do not enter confidential information when you supply string values using the API. To create a job, we recommend using projects.locations.templates.create with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.templates.create is not recommended, because your job will always start in us-central1.
projects_templates_createINSERTprojectIdCreates a Cloud Dataflow job from a template. Do not enter confidential information when you supply string values using the API. To create a job, we recommend using projects.locations.templates.create with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.templates.create is not recommended, because your job will always start in us-central1.
projects_locations_templates_launchEXEClocation, projectIdLaunches a template. To launch a template, we recommend using projects.locations.templates.launch with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.templates.launch is not recommended, because jobs launched from the template will always start in us-central1.
projects_templates_launchEXECprojectIdLaunches a template. To launch a template, we recommend using projects.locations.templates.launch with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.templates.launch is not recommended, because jobs launched from the template will always start in us-central1.

SELECT examples

Get the template associated with a template. To get the template, we recommend using projects.locations.templates.get with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.templates.get is not recommended, because only templates that are running in us-central1 are retrieved.

SELECT
metadata,
runtimeMetadata,
status,
templateType
FROM google.dataflow.templates
WHERE projectId = '{{ projectId }}';

INSERT example

Use the following StackQL query and manifest file to create a new templates resource.

/*+ create */
INSERT INTO google.dataflow.templates (
projectId,
jobName,
gcsPath,
parameters,
environment,
location
)
SELECT
'{{ projectId }}',
'{{ jobName }}',
'{{ gcsPath }}',
'{{ parameters }}',
'{{ environment }}',
'{{ location }}'
;