[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eThe job builder tool allows users to create custom batch and streaming Dataflow jobs directly in the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eUsers can define the pipeline by adding sources, transforms, and sinks, each with customizable settings depending on its type.\u003c/p\u003e\n"],["\u003cp\u003eThe tool provides features to validate pipeline configurations, run the pipeline, and monitor job progress via a job graph.\u003c/p\u003e\n"],["\u003cp\u003eJobs created with the builder can be saved as Apache Beam YAML files for sharing, reuse, and running with the gcloud CLI.\u003c/p\u003e\n"],["\u003cp\u003eTo run the pipeline, you must add at least one source and one sink, you can also add additional transforms to further manipulate the pipeline.\u003c/p\u003e\n"]]],[],null,["# Create a custom job with the job builder\n\nThe job builder lets you create custom batch and streaming Dataflow\njobs. You can also save job builder jobs as\n[Apache Beam YAML](https://beam.apache.org/documentation/sdks/yaml/)\nfiles to share and reuse.\n\nCreate a new pipeline\n---------------------\n\nTo create a new pipeline in the job builder, follow these steps:\n\n1. Go to the **Jobs** page in the Google Cloud console.\n\n [Go to Jobs](https://console.cloud.google.com/dataflow)\n2. Click add_box**Create job from\n builder**.\n\n3. For **Job name**, enter a name for the job.\n\n4. Select either **Batch** or **Streaming**.\n\n5. If you select **Streaming**, select a windowing mode. Then enter a\n specification for the window, as follows:\n\n - Fixed window: Enter a window size, in seconds.\n - Sliding window: Enter a window size and window period, in seconds.\n - Session window: Enter a session gap, in seconds.\n\n For more information about windowing, see\n [Windows and windowing functions](/dataflow/docs/concepts/streaming-pipelines#windows).\n\nNext, add sources, transforms, and sinks to the pipeline, as described in the\nfollowing sections.\n\n### Add a source to the pipeline\n\nA pipeline must have at least one source. Initially, the job builder is\npopulated with an empty source. To configure the source, perform the following\nsteps:\n\n1. In the **Source name** box, enter a name for the source or use the default\n name. The name appears in the job graph when you run the job.\n\n2. In the **Source type** list, select the type of data source.\n\n3. Depending on the source type, provide additional configuration information.\n For example, if you select BigQuery, specify the table to read\n from.\n\n If you select Pub/Sub, specify a message schema. Enter the name\n and data type of each field that you want to read from Pub/Sub\n messages. The pipeline drops any fields that aren't specified in the schema.\n4. Optional: For some source types, you can click **Preview source data** to\n preview the source data.\n\nTo add another source to the pipeline, click **Add a source** . To combine data\nfrom multiple sources, add a `SQL` or `Join` transform to your pipeline.\n\n### Add a transform to the pipeline\n\nOptionally, add one or more transforms to the pipeline. You can use the\nfollowing transforms to manipulate, aggregate, or join data from sources and\nother transforms:\n\nTo add a transform:\n\n1. Click **Add a transform**.\n\n2. In the **Transform** name box, enter a name for the transform or use the\n default name. The name appears in the job graph when you run the job.\n\n3. In the **Transform type** list, select the type of transform.\n\n4. Depending on the transform type, provide additional configuration\n information. For example, if you select **Filter (Python)**, enter a Python\n expression to use as the filter.\n\n5. Select the input step for the transform. The input step is the source or\n transform whose output provides the input for this transform.\n\n | **Note:** The `SQL` and `Join` transform can have multiple input steps.\n\n### Add a sink to the pipeline\n\nA pipeline must have at least one sink. Initially, the job builder is\npopulated with an empty sink. To configure the sink, perform the following\nsteps:\n\n1. In the **Sink name** box, enter a name for the sink or use the default name.\n The name appears in the job graph when you run the job.\n\n2. In the **Sink type** list, select the type of sink.\n\n3. Depending on the sink type, provide additional configuration information.\n For example, if you select the BigQuery sink, select the\n BigQuery table to write to.\n\n4. Select the input step for the sink. The input step is the source or transform\n whose output provides the input for this transform.\n\n5. To add another sink to the pipeline, click **Add a sink**.\n\nRun the pipeline\n----------------\n\nTo run a pipeline from the job builder, perform the following steps:\n\n1. Optional: Set Dataflow job options. To expand the\n Dataflow options section, click the\n arrow_rightexpander arrow.\n\n2. Click **Run job** . The job builder navigates to the\n [job graph](/dataflow/docs/guides/job-graph) for the submitted job. You can\n use the job graph to monitor the status of the job.\n\n| **Note:** You can load the pipeline's configuration back into the job builder by clicking the **Clone** button.\n\nValidate the pipeline before launching\n--------------------------------------\n\nFor pipelines with complex configuration, such as Python filters and SQL\nexpressions, it can be helpful to check the pipeline configuration for syntax errors before\nlaunching. To validate the pipeline syntax, perform the following steps:\n\n1. Click **Validate** to open Cloud Shell and start the validation service.\n2. Click **Start Validating**.\n3. If an error is found during validation, a red exclamation mark appears.\n4. Fix any detected errors and verify the fixes by clicking **Validate**. If no error is found, a green checkmark appears.\n\nRun with the gcloud CLI\n-----------------------\n\nYou can also run Beam YAML pipelines by using the gcloud CLI. To\nrun a job builder pipeline with the gcloud CLI:\n\n1. Click **Save YAML** to open the **Save YAML** window.\n\n2. Perform one of the following actions:\n\n - To save to Cloud Storage, enter a Cloud Storage path and click **Save**.\n - To download a local file, click **Download**.\n3. Run the following command in your shell or terminal:\n\n gcloud dataflow yaml run my-job-builder-job --yaml-pipeline-file=\u003cvar translate=\"no\"\u003eYAML_FILE_PATH\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eYAML_FILE_PATH\u003c/var\u003e with the path of your YAML file, either locally or in Cloud Storage.\n\nWhat's next\n-----------\n\n- [Use the Dataflow job monitoring interface](/dataflow/docs/guides/monitoring-overview).\n- [Save and load](/dataflow/docs/guides/job-builder-save-load-yaml) YAML job definitions in the job builder.\n- Learn more about [Beam YAML](https://beam.apache.org/documentation/sdks/yaml/)."]]