Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Pembangun tugas memungkinkan Anda membuat tugas batch dan streaming Dataflow
kustom. Anda juga dapat menyimpan tugas builder tugas sebagai file Apache Beam YAML untuk dibagikan dan digunakan kembali.
Membuat pipeline baru
Untuk membuat pipeline baru di pembuat tugas, ikuti langkah-langkah berikut:
Selanjutnya, tambahkan sumber, transformasi, dan tujuan ke pipeline, seperti yang dijelaskan di bagian berikut.
Menambahkan sumber ke pipeline
Pipeline harus memiliki minimal satu sumber. Awalnya, pembuat tugas diisi dengan sumber kosong. Untuk mengonfigurasi sumber, lakukan langkah-langkah
berikut:
Di kotak Nama sumber, masukkan nama untuk sumber atau gunakan nama default. Nama ini akan muncul di grafik tugas saat Anda menjalankan tugas.
Dalam daftar Source type, pilih jenis sumber data.
Bergantung pada jenis sumber, berikan informasi konfigurasi tambahan.
Misalnya, jika Anda memilih BigQuery, tentukan tabel yang akan dibaca.
Jika Anda memilih Pub/Sub, tentukan skema pesan. Masukkan nama dan jenis data setiap kolom yang ingin Anda baca dari pesan Pub/Sub. Pipeline akan menghapus kolom apa pun yang tidak ditentukan dalam skema.
Opsional: Untuk beberapa jenis sumber, Anda dapat mengklik Pratinjau data sumber untuk melihat pratinjau data sumber.
Untuk menambahkan sumber lain ke pipeline, klik Tambahkan sumber. Untuk menggabungkan data dari beberapa sumber, tambahkan transformasi SQL atau Join ke pipeline Anda.
Menambahkan transformasi ke pipeline
Jika ingin, tambahkan satu atau beberapa transformasi ke pipeline. Anda dapat menggunakan transformasi berikut untuk memanipulasi, menggabungkan, atau menggabungkan data dari sumber dan transformasi lainnya:
Konfigurasi transformasi YAML: Berikan parameter konfigurasi untuk transformasi YAML sebagai peta YAML. Pasangan nilai kunci digunakan untuk mengisi bagian config dari transformasi Beam YAML yang dihasilkan. Untuk mengetahui parameter konfigurasi yang didukung
untuk setiap jenis transformasi, lihat
dokumentasi transformasi YAML Beam.
Contoh parameter konfigurasi:
Di kotak nama Transform, masukkan nama untuk transformasi atau gunakan
nama default. Nama ini akan muncul di grafik tugas saat Anda menjalankan tugas.
Dalam daftar Jenis transformasi, pilih jenis transformasi.
Bergantung pada jenis transformasi, berikan informasi konfigurasi tambahan. Misalnya, jika Anda memilih Filter (Python), masukkan ekspresi
Python untuk digunakan sebagai filter.
Pilih langkah input untuk transformasi. Langkah input adalah sumber atau
transformasi yang outputnya memberikan input untuk transformasi ini.
Menambahkan sink ke pipeline
Pipeline harus memiliki minimal satu tujuan. Awalnya, pembuat tugas diisi dengan sink kosong. Untuk mengonfigurasi sink, lakukan langkah-langkah
berikut:
Di kotak Sink name, masukkan nama untuk sink atau gunakan nama default.
Nama ini akan muncul di grafik tugas saat Anda menjalankan tugas.
Dalam daftar Sink type, pilih jenis sink.
Bergantung pada jenis tujuan, berikan informasi konfigurasi tambahan.
Misalnya, jika Anda memilih sink BigQuery, pilih tabel BigQuery yang akan ditulisi.
Pilih langkah input untuk sink. Langkah input adalah sumber atau transformasi
yang outputnya memberikan input untuk transformasi ini.
Untuk menambahkan tujuan lain ke pipeline, klik Tambahkan tujuan.
Menjalankan pipeline
Untuk menjalankan pipeline dari pembuat tugas, lakukan langkah-langkah berikut:
Opsional: Tetapkan opsi tugas Dataflow. Untuk meluaskan bagian
Dataflow options, klik panah peluas arrow_right.
Klik Run job. Pembangun tugas membuka
grafik tugas untuk tugas yang dikirimkan. Anda dapat
menggunakan grafik tugas untuk memantau status tugas.
Memvalidasi pipeline sebelum meluncurkan
Untuk pipeline dengan konfigurasi yang kompleks, seperti filter Python dan ekspresi SQL, sebaiknya periksa konfigurasi pipeline untuk mengetahui apakah ada error sintaksis sebelum diluncurkan. Untuk memvalidasi sintaksis pipeline, lakukan langkah-langkah berikut:
Klik Validate untuk membuka Cloud Shell dan memulai layanan validasi.
Klik Mulai Validasi.
Jika error ditemukan selama validasi, tanda seru merah akan muncul.
Perbaiki error yang terdeteksi dan verifikasi perbaikan dengan mengklik Validasi. Jika
tidak ada error, tanda centang hijau akan muncul.
Menjalankan dengan gcloud CLI
Anda juga dapat menjalankan pipeline YAML Beam menggunakan gcloud CLI. Untuk
menjalankan pipeline pembuat tugas dengan gcloud CLI:
Klik Simpan YAML untuk membuka jendela Simpan YAML.
Lakukan salah satu tindakan berikut:
Untuk menyimpan ke Cloud Storage, masukkan jalur Cloud Storage, lalu klik Simpan.
Untuk mendownload file lokal, klik Download.
Jalankan perintah berikut di shell atau terminal Anda:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 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/)."]]