Skip to main content

pipelines

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

Overview

Namepipelines
TypeResource
Idgoogle.datapipelines.pipelines

Fields

NameDatatypeDescription
namestringThe pipeline name. For example: projects/PROJECT_ID/locations/LOCATION_ID/pipelines/PIPELINE_ID. PROJECT_ID can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), and periods (.). For more information, see Identifying projects. LOCATION_ID is the canonical ID for the pipeline's location. The list of available locations can be obtained by calling google.cloud.location.Locations.ListLocations. Note that the Data Pipelines service is not available in all regions. It depends on Cloud Scheduler, an App Engine application, so it's only available in App Engine regions. * PIPELINE_ID is the ID of the pipeline. Must be unique for the selected project and location.
createTimestringOutput only. Immutable. The timestamp when the pipeline was initially created. Set by the Data Pipelines service.
displayNamestringRequired. The display name of the pipeline. It can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), and underscores (_).
jobCountintegerOutput only. Number of jobs.
lastUpdateTimestringOutput only. Immutable. The timestamp when the pipeline was last modified. Set by the Data Pipelines service.
pipelineSourcesobjectImmutable. The sources of the pipeline (for example, Dataplex). The keys and values are set by the corresponding sources during pipeline creation.
scheduleInfoobjectDetails of the schedule the pipeline runs on.
schedulerServiceAccountEmailstringOptional. A service account email to be used with the Cloud Scheduler job. If not specified, the default compute engine service account will be used.
statestringRequired. The state of the pipeline. When the pipeline is created, the state is set to 'PIPELINE_STATE_ACTIVE' by default. State changes can be requested by setting the state to stopping, paused, or resuming. State cannot be changed through UpdatePipeline requests.
typestringRequired. The type of the pipeline. This field affects the scheduling of the pipeline and the type of metrics to show for the pipeline.
workloadobjectWorkload details for creating the pipeline jobs.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, pipelinesId, projectsIdLooks up a single pipeline. Returns a "NOT_FOUND" error if no such pipeline exists. Returns a "FORBIDDEN" error if the caller doesn't have permission to access it.
listSELECTlocationsId, projectsIdLists pipelines. Returns a "FORBIDDEN" error if the caller doesn't have permission to access it.
createINSERTlocationsId, projectsIdCreates a pipeline. For a batch pipeline, you can pass scheduler information. Data Pipelines uses the scheduler information to create an internal scheduler that runs jobs periodically. If the internal scheduler is not configured, you can use RunPipeline to run jobs.
deleteDELETElocationsId, pipelinesId, projectsIdDeletes a pipeline. If a scheduler job is attached to the pipeline, it will be deleted.
patchUPDATElocationsId, pipelinesId, projectsIdUpdates a pipeline. If successful, the updated Pipeline is returned. Returns NOT_FOUND if the pipeline doesn't exist. If UpdatePipeline does not return successfully, you can retry the UpdatePipeline request until you receive a successful response.
runEXEClocationsId, pipelinesId, projectsIdCreates a job for the specified pipeline directly. You can use this method when the internal scheduler is not configured and you want to trigger the job directly or through an external system. Returns a "NOT_FOUND" error if the pipeline doesn't exist. Returns a "FORBIDDEN" error if the user doesn't have permission to access the pipeline or run jobs for the pipeline.
stopEXEClocationsId, pipelinesId, projectsIdFreezes pipeline execution permanently. If there's a corresponding scheduler entry, it's deleted, and the pipeline state is changed to "ARCHIVED". However, pipeline metadata is retained.

SELECT examples

Lists pipelines. Returns a "FORBIDDEN" error if the caller doesn't have permission to access it.

SELECT
name,
createTime,
displayName,
jobCount,
lastUpdateTime,
pipelineSources,
scheduleInfo,
schedulerServiceAccountEmail,
state,
type,
workload
FROM google.datapipelines.pipelines
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.datapipelines.pipelines (
locationsId,
projectsId,
displayName,
name,
type,
pipelineSources,
scheduleInfo,
workload,
state,
schedulerServiceAccountEmail
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ displayName }}',
'{{ name }}',
'{{ type }}',
'{{ pipelineSources }}',
'{{ scheduleInfo }}',
'{{ workload }}',
'{{ state }}',
'{{ schedulerServiceAccountEmail }}'
;

UPDATE example

Updates a pipelines resource.

/*+ update */
UPDATE google.datapipelines.pipelines
SET
displayName = '{{ displayName }}',
name = '{{ name }}',
type = '{{ type }}',
pipelineSources = '{{ pipelineSources }}',
scheduleInfo = '{{ scheduleInfo }}',
workload = '{{ workload }}',
state = '{{ state }}',
schedulerServiceAccountEmail = '{{ schedulerServiceAccountEmail }}'
WHERE
locationsId = '{{ locationsId }}'
AND pipelinesId = '{{ pipelinesId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified pipelines resource.

/*+ delete */
DELETE FROM google.datapipelines.pipelines
WHERE locationsId = '{{ locationsId }}'
AND pipelinesId = '{{ pipelinesId }}'
AND projectsId = '{{ projectsId }}';