Benutzerdefinierten Job mit dem Job-Builder erstellen
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Mit dem Job-Builder können Sie benutzerdefinierte Batch- und Streaming-Dataflow-Jobs erstellen. Sie können Job-Builder-Jobs auch als Apache Beam-YAML-Dateien speichern, um sie freizugeben und wiederzuverwenden.
Neue Pipeline erstellen
So erstellen Sie eine neue Pipeline im Job-Builder:
Rufen Sie in der Google Cloud -Console die Seite Jobs auf.
Fügen Sie der Pipeline dann Quellen, Transformationen und Senken hinzu, wie in den folgenden Abschnitten beschrieben.
Quelle zur Pipeline hinzufügen
Eine Pipeline muss mindestens eine Quelle haben. Anfangs ist der Job-Builder mit einer leeren Quelle gefüllt. So konfigurieren Sie die Quelle:
Geben Sie im Feld Quellname einen Namen für die Quelle ein oder verwenden Sie den Standardnamen. Der Name wird im Jobdiagramm angezeigt, wenn Sie den Job ausführen.
Wählen Sie in der Liste Quelltyp den Typ der Datenquelle aus.
Geben Sie je nach Quelltyp zusätzliche Konfigurationsinformationen an.
Wenn Sie beispielsweise BigQuery auswählen, geben Sie die Tabelle an, aus der Daten gelesen werden sollen.
Wenn Sie Pub/Sub auswählen, geben Sie ein Nachrichtenschema an. Geben Sie den Namen und den Datentyp der einzelnen Felder ein, die aus Pub/Sub-Nachrichten gelesen werden sollen. In der Pipeline werden alle Felder entfernt, die nicht im Schema angegeben sind.
Optional: Bei einigen Quelltypen können Sie auf Quelldaten in der Vorschau ansehen klicken, um sich eine Vorschau der Quelldaten anzusehen.
Wenn Sie der Pipeline eine weitere Quelle hinzufügen möchten, klicken Sie auf Quelle hinzufügen. Wenn Sie Daten aus mehreren Quellen kombinieren möchten, fügen Sie Ihrer Pipeline eine SQL- oder Join-Transformation hinzu.
Der Pipeline eine Transformation hinzufügen
Optional können Sie der Pipeline eine oder mehrere Transformationen hinzufügen. Mit den folgenden Transformationen können Sie Daten aus Quellen und anderen Transformationen bearbeiten, aggregieren oder zusammenführen:
Alle Transformationen aus dem Beam YAML SDK verwenden.
YAML-Transformationskonfiguration: Geben Sie die Konfigurationsparameter für die YAML-Transformation als YAML-Zuordnung an. Die Schlüssel/Wert-Paare werden verwendet, um den Konfigurationsabschnitt der resultierenden Beam-YAML-Transformation zu füllen. Die unterstützten Konfigurationsparameter für jeden Transformationstyp finden Sie in der Beam-YAML-Transformationsdokumentation.
Beispielkonfigurationsparameter:
Geben Sie im Feld Transformieren einen Namen für die Transformation ein oder verwenden Sie den Standardnamen. Der Name wird im Jobdiagramm angezeigt, wenn Sie den Job ausführen.
Wählen Sie in der Liste Transformationsart die Art der Transformation aus.
Geben Sie je nach Transformationstyp zusätzliche Konfigurationsinformationen an. Wenn Sie beispielsweise Filter (Python) auswählen, geben Sie einen Python-Ausdruck ein, der als Filter verwendet werden soll.
Wählen Sie den Eingabeschritt für die Transformation aus. Der Eingabeschritt ist die Quelle oder Transformation, deren Ausgabe die Eingabe für diese Transformation liefert.
Senke zur Pipeline hinzufügen
Eine Pipeline muss mindestens ein Ziel haben. Anfangs ist der Job-Builder mit einem leeren Senkenknoten gefüllt. So konfigurieren Sie die Senke:
Geben Sie im Feld Name der Senke einen Namen für die Senke ein oder verwenden Sie den Standardnamen.
Der Name wird im Jobdiagramm angezeigt, wenn Sie den Job ausführen.
Wählen Sie in der Liste Sink-Typ den Typ des Sinks aus.
Geben Sie je nach Senkentyp zusätzliche Konfigurationsinformationen an.
Wenn Sie beispielsweise die BigQuery-Senke auswählen, wählen Sie die BigQuery-Tabelle aus, in die geschrieben werden soll.
Wählen Sie den Eingabeschritt für die Senke aus. Der Eingabeschritt ist die Quelle oder Transformation, deren Ausgabe die Eingabe für diese Transformation liefert.
Wenn Sie der Pipeline ein weiteres Ziel hinzufügen möchten, klicken Sie auf Ziel hinzufügen.
Pipeline ausführen
Führen Sie die folgenden Schritte aus, um eine Pipeline über den Job-Builder auszuführen:
Optional: Dataflow-Joboptionen festlegen Klicken Sie zum Erweitern des Abschnitts „Dataflow-Optionen“ auf den arrow_rightErweiterungspfeil.
Klicken Sie auf Job ausführen. Der Job-Builder ruft das Job-Diagramm für den eingereichten Job auf. Mit der Jobgrafik können Sie den Status des Jobs überwachen.
Pipeline vor dem Starten validieren
Bei Pipelines mit komplexer Konfiguration, z. B. Python-Filtern und SQL-Ausdrücken, kann es hilfreich sein, die Pipelinekonfiguration vor dem Start auf Syntaxfehler zu prüfen. Führen Sie die folgenden Schritte aus, um die Pipelinesyntax zu validieren:
Klicken Sie auf Validieren, um Cloud Shell zu öffnen und den Validierungsdienst zu starten.
Klicken Sie auf Überprüfung starten.
Wenn bei der Validierung ein Fehler gefunden wird, wird ein rotes Ausrufezeichen angezeigt.
Beheben Sie alle erkannten Fehler und bestätigen Sie die Korrekturen, indem Sie auf Validieren klicken. Wenn kein Fehler gefunden wird, wird ein grünes Häkchen angezeigt.
Mit der gcloud CLI ausführen
Sie können Beam YAML-Pipelines auch mit der gcloud CLI ausführen. So führen Sie eine Job-Builder-Pipeline mit der gcloud CLI aus:
Klicken Sie auf YAML speichern, um das Fenster YAML speichern zu öffnen.
Führen Sie eine der folgenden Aktionen aus:
Wenn Sie in Cloud Storage speichern möchten, geben Sie einen Cloud Storage-Pfad ein und klicken Sie auf Speichern.
Klicken Sie auf Herunterladen, um eine lokale Datei herunterzuladen.
Führen Sie den folgenden Befehl in der Shell oder im Terminal aus:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-09 (UTC)."],[[["\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/)."]]