이 페이지에서는 Cloud Composer 및 트리거를 사용한 파이프라인 조정에 대해 설명합니다. Cloud Data Fusion은 Cloud Composer를 사용하여 파이프라인을 조정하는 것을 권장합니다. 조정을 더 간단하게 관리하는 방법이 필요한 경우 트리거를 사용하세요.
Composer
Cloud Composer로 파이프라인 조정
Cloud Composer를 사용하여 Cloud Data Fusion에서 파이프라인 실행을 조정하면 다음과 같은 이점이 있습니다.
중앙 집중식 워크플로 관리: 여러 Cloud Data Fusion 파이프라인의 실행을 일관되게 관리합니다.
종속 항목 관리: 올바른 실행 순서를 보장하려면 파이프라인 간의 종속 항목을 정의합니다.
모니터링 및 알림: Cloud Composer는 모니터링 기능과 오류에 대한 알림을 제공합니다.
다른 서비스와의 통합: Cloud Composer를 사용하면 Cloud Data Fusion 및 기타Google Cloud 서비스 전반에서 워크플로를 조정할 수 있습니다.
Cloud Composer를 사용하여 Cloud Data Fusion 파이프라인을 조정하려면 다음 프로세스를 따르세요.
Cloud Composer 환경을 설정합니다.
Cloud Composer 환경을 만듭니다. 환경이 없는 경우 프로젝트에서 환경을 프로비저닝합니다. Google Cloud
이 환경이 조정 작업공간입니다.
권한 부여. Cloud Composer 서비스 계정에 Cloud Data Fusion에 액세스하는 데 필요한 권한(예: 파이프라인 시작, 중지, 나열 권한)이 있는지 확인합니다.
조정을 위한 방향성 비순환 그래프(DAG)를 정의합니다.
DAG 만들기: Cloud Composer에서 Cloud Data Fusion 파이프라인의 조정 워크플로를 정의하는 DAG를 만듭니다.
Cloud Data Fusion 연산자: DAG 내에서 Cloud Composer의 Cloud Data Fusion 연산자를 사용합니다. 이러한 연산자를 사용하면 Cloud Data Fusion과 프로그래매틱 방식으로 상호작용할 수 있습니다.
Cloud Data Fusion 연산자
Cloud Data Fusion 파이프라인 오케스트레이션에는 다음과 같은 연산자가 있습니다.
CloudDataFusionStartPipelineOperator
Cloud Data Fusion 파이프라인의 ID를 기준으로 실행을 트리거합니다. 여기에는 다음과 같은 파라미터가 있습니다.
파이프라인 ID
위치 (Google Cloud 지역)
파이프라인 네임스페이스
런타임 인수(선택사항)
완료될 때까지 대기(선택사항)
제한 시간(선택사항)
CloudDataFusionStopPipelineOperator
실행 중인 Cloud Data Fusion 파이프라인을 중지할 수 있습니다.
CloudDataFusionDeletePipelineOperator
Cloud Data Fusion 파이프라인을 삭제합니다.
DAG 워크플로 빌드
DAG 워크플로를 빌드할 때는 다음 사항을 고려하세요.
종속 항목 정의: DAG 구조를 사용하여 작업 간의 종속 항목을 정의합니다. 예를 들어 한 네임스페이스의 파이프라인이 성공적으로 완료될 때까지 기다린 후 다른 네임스페이스의 다른 파이프라인을 트리거하는 작업이 있을 수 있습니다.
예약: 매일 또는 매시간과 같은 특정 간격으로 실행되도록 DAG를 예약하거나 수동으로 트리거되도록 설정합니다.
Cloud Data Fusion 트리거를 사용하면 하나 이상의 업스트림 파이프라인이 완료될 때(성공, 실패 또는 지정된 조건) 다운스트림 파이프라인을 자동으로 실행할 수 있습니다.
트리거는 다음과 같은 작업에 유용합니다.
데이터를 한 번 정리한 다음 여러 다운스트림 파이프라인에서 사용할 수 있도록 합니다.
파이프라인 간에 런타임 인수 및 플러그인 구성과 같은 정보를 공유합니다. 이 작업을 페이로드 구성이라고 합니다.
실행할 때마다 업데이트해야 하는 정적 파이프라인 대신 시간/일/주/월별 데이터를 사용하여 실행되는 동적 파이프라인 집합이 있습니다.
예를 들어 회사의 배송에 관한 모든 정보가 포함된 데이터 세트가 있습니다. 이 데이터를 기반으로 몇 가지 비즈니스 질문에 답변하려고 합니다. 이를 위해 배송에 관한 원시 데이터를 정리하는 배송 데이터 정리라는 파이프라인을 만듭니다. 그런 다음 정리된 데이터를 읽고 지정된 기준점을 초과하여 지연된 미국 내 배송을 찾는 두 번째 파이프라인인 미국 배송 지연을 만듭니다. 업스트림 배송 데이터 정리 파이프라인이 완료되는 즉시 미국 배송 지연 파이프라인을 트리거할 수 있습니다.
또한 다운스트림 파이프라인은 업스트림 파이프라인의 출력을 소비하므로 다운스트림 파이프라인이 이 트리거를 사용하여 실행될 때 읽을 입력 디렉터리(업스트림 파이프라인이 출력을 생성한 디렉터리)도 수신하도록 지정해야 합니다. 이 프로세스를 페이로드 구성 전달이라고 하며 런타임 인수로 정의합니다. 이를 통해 시간/일/주/월별 데이터를 사용하여 실행되는 동적 파이프라인 집합을 보유할 수 있습니다(실행할 때마다 업데이트해야 하는 정적 파이프라인이 아님).
트리거로 파이프라인을 조정하려면 다음 프로세스를 따르세요.
업스트림 및 다운스트림 파이프라인 만들기
Cloud Data Fusion Studio에서 조정 체인을 구성하는 파이프라인을 설계하고 배포합니다.
워크플로에서 어떤 파이프라인이 완료되면 다음 파이프라인(다운스트림)이 활성화되는지 고려하세요.
선택사항: 업스트림 파이프라인에 대한 런타임 인수를 전달합니다.
파이프라인 간에 페이로드 구성을 런타임 인수로 전달해야 하는 경우 런타임 인수를 구성합니다. 이러한 인수는 실행 중에 다운스트림 파이프라인에 전달될 수 있습니다.
다운스트림 파이프라인에 인바운드 트리거 만들기
Cloud Data Fusion Studio에서 목록 페이지로 이동합니다. 배포 탭에서 다운스트림 파이프라인의 이름을 클릭합니다. 파이프라인의 배포 보기가 표시됩니다.
페이지 가운데 왼쪽에서 인바운드 트리거를 클릭합니다.
사용 가능한 파이프라인 목록이 표시됩니다.
업스트림 파이프라인을 클릭합니다. 다운스트림 파이프라인이 실행되는 시간에 대한 조건으로 하나 이상의 업스트림 파이프라인 완료 상태(성공, 실패, 중지)를 선택합니다.
업스트림 파이프라인이 페이로드 구성이라고 부르는 정보를 다운스트림 파이프라인과 공유하도록 설정하려면 트리거 구성을 클릭한 후 페이로드 구성을 런타임 인수로 전달 단계를 수행합니다.
그렇지 않으면 트리거 사용 설정을 클릭합니다.
트리거 테스트
업스트림 파이프라인 실행을 시작합니다.
트리거가 올바르게 구성되면 구성된 조건에 따라 업스트림 파이프라인이 완료될 때 다운스트림 파이프라인이 자동으로 실행됩니다.
페이로드 구성을 런타임 인수로 전달
페이로드 구성은 업스트림 파이프라인에서 다운스트림 파이프라인으로 정보를 공유할 수 있게 해줍니다. 예를 들어 이 정보는 출력 디렉터리, 데이터 형식, 파이프라인이 실행된 날짜일 수 있습니다. 그런 다음 이 정보는 올바르게 읽어야 할 데이터 세트 확인과 같은 결정을 내리기 위해 다운스트림 파이프라인에 사용됩니다.
업스트림 파이프라인에서 다운스트림 파이프라인으로 정보를 전달하려면다운스트림 파이프라인의 런타임 인수를 런타임 인수의 값 또는 업스트림 파이프라인의 모든 플러그인 구성의 값으로 설정합니다.
다운스트림 파이프라인이 트리거되어 실행될 때마다 다운스트림 파이프라인을 트리거한 업스트림 파이프라인의 특정 실행에 대한 런타임 인수를 사용하여 페이로드 구성을 설정합니다.
페이로드 구성을 런타임 인수로 전달하려면 다음 단계를 따르세요.
인바운드 트리거 만들기에서 중단한 지점을 선택하고, 트리거 구성을 클릭하면 업스트림 파이프라인에 대해 이전에 설정한 런타임 인수가 표시됩니다. 이 트리거가 실행될 때 업스트림 파이프라인에서 다운스트림 파이프라인으로 전달하려는 런타임 인수를 선택합니다.
플러그인 구성 탭을 클릭하여 트리거될 때 업스트림 파이프라인에서 다운스트림 파이프라인으로 전달되는 항목 목록을 확인합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eCloud Composer can orchestrate multiple Cloud Data Fusion pipelines, offering centralized workflow and dependency management, monitoring, alerting, and integration with other Google Cloud services.\u003c/p\u003e\n"],["\u003cp\u003eCloud Composer uses Directed Acyclic Graphs (DAGs) and Cloud Data Fusion Operators to define and manage pipeline orchestration, including starting, stopping, and deleting pipelines.\u003c/p\u003e\n"],["\u003cp\u003eTriggers in Cloud Data Fusion allow automatic execution of downstream pipelines upon completion of upstream pipelines, based on success, failure, or other conditions.\u003c/p\u003e\n"],["\u003cp\u003eTriggers facilitate dynamic pipelines by enabling the sharing of runtime arguments and plugin configurations (payload configuration) between upstream and downstream pipelines.\u003c/p\u003e\n"],["\u003cp\u003eUsing payload configuration with triggers, the downstream pipeline can receive information, such as output directory and data format, from the upstream pipeline.\u003c/p\u003e\n"]]],[],null,["# Orchestrate pipelines\n\nThis page explains pipeline orchestration with Cloud Composer and\ntriggers. Cloud Data Fusion recommends using Cloud Composer to\norchestrate pipelines. If you require a simpler way to manage orchestration, use\ntriggers. \n\n### Composer\n\nOrchestrate pipelines with Cloud Composer\n-----------------------------------------\n\nOrchestrating pipeline execution in Cloud Data Fusion with\nCloud Composer provides following benefits:\n\n- **Centralized workflow management:** uniformly manage the execution of multiple Cloud Data Fusion pipelines.\n- **Dependency management:** to ensure proper execution order, define dependencies between pipelines.\n- **Monitoring and alerting:** Cloud Composer provides monitoring capabilities and alerts for failures.\n- **Integration with other services:** Cloud Composer lets you orchestrate workflows that span across Cloud Data Fusion and other Google Cloud services.\n\nTo orchestrate Cloud Data Fusion pipelines using\nCloud Composer, follow this process:\n\n1. **Set up the Cloud Composer environment.**\n\n - **Create a Cloud Composer environment.** If you don't have one, provision the environment in your Google Cloud project. This environment is your orchestration workspace.\n - **Give permissions.** Ensure the Cloud Composer service account has the necessary permissions to access Cloud Data Fusion (such as permission to start, stop, and list pipelines).\n2. **Define Directed Acyclic Graphs (DAG) for orchestration.**\n\n - **Create a DAG:** In Cloud Composer, create a DAG that defines the orchestration workflow for your Cloud Data Fusion pipelines.\n - **Cloud Data Fusion Operators:** Use Cloud Composer's Cloud Data Fusion Operators within your DAG. These operators let you interact programmatically with Cloud Data Fusion.\n\n### Cloud Data Fusion operators\n\nCloud Data Fusion pipeline orchestration has the following operators:\n\n`CloudDataFusionStartPipelineOperator`\n\n: Triggers the execution of a Cloud Data Fusion pipeline by its ID. It\n has the following parameters:\n\n - Pipeline ID\n - Location (Google Cloud region)\n - Pipeline namespace\n - Runtime arguments (optional)\n - Wait for completion (optional)\n - Timeout (optional)\n\n`CloudDataFusionStopPipelineOperator`\n\n: Lets you stop a running Cloud Data Fusion pipeline.\n\n`CloudDataFusionDeletePipelineOperator`\n\n: Deletes a Cloud Data Fusion pipeline.\n\n### Build the DAG workflow\n\nWhen you build the DAG workflow, consider the following:\n\n- **Defining dependencies:** Use the DAG structure to define dependencies between tasks. For example, you might have a task that waits for a pipeline in one namespace to complete successfully before triggering another pipeline in a different namespace.\n- **Scheduling:** Schedule the DAG to run at specific intervals, such as daily or hourly, or set it to be triggered manually.\n\nFor more information, see the\n[Cloud Composer overview](/composer/docs/concepts/overview).\n\n### Triggers\n\nOrchestrate pipelines with triggers\n-----------------------------------\n\nCloud Data Fusion triggers let you automatically execute a downstream\npipeline upon the completion (success, failure, or any specified condition)\nof one or more upstream pipelines.\n\nTriggers are useful for the following tasks:\n\n- Cleaning your data once, and then making it available to multiple downstream pipelines for consumption.\n- Sharing information, such as runtime arguments and plugin configurations, between pipelines. This task is called *payload\n configuration*.\n- Having a set of dynamic pipelines that run using the data from the hour, day, week, or month, instead of a static pipeline that must be updated for every run.\n\nFor example, you have a dataset that contains all information about your\ncompany's shipments. Based on this data, you want to answer several business\nquestions. To do this, you create one pipeline that cleanses the raw data\nabout shipments, called *Shipments Data Cleaning* . Then you create a second\npipeline, *Delayed Shipments USA* , which reads the cleansed data and finds\nthe shipments within the USA that were delayed by more than a specified\nthreshold. The *Delayed Shipments USA* pipeline can be triggered as soon as\nthe upstream *Shipments Data Cleaning* pipeline successfully completes.\n\nAdditionally, since the downstream pipeline consumes the output of the\nupstream pipeline, you must specify that when the downstream pipeline runs\nusing this trigger, it also receives the input directory to read from (which\nis the directory where the upstream pipeline generated its output). This\nprocess is called *passing payload configuration*, which you define with\nruntime arguments. It lets you have a set of dynamic pipelines that\nrun using the data of the hour, day, week, or month (not a static pipeline,\nwhich must be updated for every run).\n| **Note:** Don't trigger upgrades with Terraform. For more information, see the [limitations for Cloud Data Fusion upgrades](/data-fusion/docs/how-to/upgrading#limitations).\n\nTo orchestrate pipelines with triggers, follow this process:\n\n1. **Create upstream and downstream pipelines.**\n\n - In the Cloud Data Fusion Studio, design and deploy the pipelines that form your orchestration chain.\n - Consider which pipeline's completion will activate the next pipeline (downstream) in your workflow.\n2. **Optional: pass runtime arguments for upstream pipelines.**\n\n - If you need to [pass payload configuration as runtime arguments](#pass-payload-configs) between pipelines, configure runtime arguments. These arguments can be passed to the downstream pipeline during execution.\n3. **Create an inbound trigger on the downstream pipeline.**\n\n - In the Cloud Data Fusion Studio, go to the **List** page. In the **Deployed** tab, click the name of the downstream pipeline. The Deploy view for that pipeline appears.\n - On the middle left side of the page, click **Inbound triggers**. A list of available pipelines appears.\n - Click the upstream pipeline. Select one or more of the upstream pipeline completion states (**Succeeds** , **Fails** , or **Stops**) as the condition for when the downstream pipeline should run.\n - If you want the upstream pipeline to share information (called *payload configuration* ) with the downstream pipeline, click **Trigger config** and then follow the steps to [pass payload configuration as runtime arguments](#pass-payload-configs). Otherwise, click **Enable trigger**.\n4. **Test the trigger.**\n\n - Initiate a run of the upstream pipeline.\n - If the trigger is configured correctly, the downstream pipeline automatically executes upon completion of the upstream pipelines, based on your configured condition.\n\n### Pass payload configuration as runtime arguments\n\nPayload configuration allows sharing of information from the upstream\npipeline to the downstream pipeline. This information can be, for example,\nthe output directory, the data format, or the day the pipeline was run. This\ninformation is then used by the downstream pipeline for decisions such as\ndetermining the right dataset to read from.\n\nTo pass information from the upstream pipeline to the downstream pipeline,\nyou set the runtime arguments of the downstream pipeline with the values of\neither the runtime arguments or the configuration of any plugin in the\nupstream pipeline.\n\nWhenever the downstream pipeline triggers and runs, its payload\nconfiguration is set using the runtime arguments of the particular run of\nthe upstream pipeline that triggered the downstream pipeline.\n\nTo pass payload configuration as runtime arguments, follow these steps:\n\n1. Picking up where you left off in the [Creating an inbound trigger](/data-fusion/docs/how-to/using-triggers#create_inbound_trigger), after clicking **Trigger config** , any runtime arguments you [previously set](/data-fusion/docs/how-to/using-triggers#before_you_begin) for your upstream pipeline will appear. Choose the runtime arguments to pass from the upstream pipeline to the downstream pipeline when this trigger executes.\n2. Click the **Plugin config** tab to see a list of what will be passed from your upstream pipeline to your downstream pipeline when it is triggered.\n3. Click **Configure and Enable Trigger**."]]