배포 구성

이 문서에서는 다음 영역에서 Cortex Framework의 배포 구성 옵션을 설명합니다.

이 가이드에서는 일반적인 배포 사용 사례 및 시나리오에 대한 단계별 안내가 포함된 방법 가이드도 제공합니다.

구성 파일: config/config.yaml

config/config.yaml 파일은 일반적으로 config/config.yaml.example 템플릿에서 초기화되며 Cortex Framework 배포의 기본 구성으로 사용됩니다. 타겟 Google Cloud 실행 프로젝트, 소스 및 대상 BigQuery 데이터 세트, 저장소 및 워크스페이스 이름과 같은 Dataform 사양을 비롯한 중요한 매개변수를 정의합니다.

다음 섹션에서는 config/config.yaml 구조를 자세히 설명합니다.

빌드 환경

빌드 환경 프로젝트는 BigQuery 작업 (DD03L 읽기)과 같은 빌드 작업에 대해 요금이 청구되는 프로젝트입니다.

buildEnvironment:
  buildProjectId: YOUR_BUILD_PROJECT_ID

다음 표에서는 빌드 환경 매개변수를 설명합니다.

매개변수 의미 기본값 설명
buildEnvironment.buildProjectId 빌드 프로젝트 ID YOUR_BUILD_PROJECT_ID Google Cloud 빌드 작업이 실행되는 프로젝트 ID입니다.

데이터 섹션 개요

구성 파일의 data: 섹션은 데이터 소스, 타겟, 데이터 파운데이션 및 데이터 제품의 특정 모듈을 정의합니다. 일반적인 구조는 다음과 같습니다.

data:
   # Geographic location for BigQuery datasets (for example: US, EU, us-central1)
   # For full list see: https://docs.cloud.google.com/cortex/docs/supported-locations
  bigQueryLocation: US
  # List of namespaces for data foundation and product modules.
  namespaces:
    - name: cortex
      path: cortex
  # List of source datasets.
  sources:
    - ...
  # List of target datasets.
  targets:
    - ...

  # Configuration for data foundation and product modules.
  modules:
    # List of foundation modules.
    foundation:
    - ... 
    # List of data product modules.
    product:
    - ...

데이터: BigQuery 위치

BigQuery 소스 및 대상 데이터 세트의 위치를 정의합니다.

매개변수 의미 기본값 설명
data.bigQueryLocation BigQuery 위치 US BigQuery 데이터 세트 위치 (예: US, us-central1, europe-west1)

데이터: Cortex 네임스페이스

Cortex Framework 네임스페이스를 정의합니다.

매개변수 의미 기본값 설명
data.namespaces.name 네임스페이스 이름 - Cortex Framework 네임스페이스 이름입니다. 예를 들면 cortex입니다.
data.namespaces.path 네임스페이스 경로 - src 및 config 폴더 내에서 사용되는 하위 디렉터리의 Cortex Framework 네임스페이스 경로입니다. 예를 들면 cortex입니다.

데이터: BigQuery 소스 및 대상 데이터 세트

소스 목록은 소스 시스템의 원시 데이터가 복제되거나 스트리밍된 BigQuery 데이터 세트를 정의합니다.

타겟은 Dataform에서 처리한 데이터 세트가 저장될 BigQuery 데이터 세트 목록을 정의합니다.

소스와 타겟은 각각 고유 ID를 사용하여 모듈에서 참조됩니다.

# Data source and target mapping
sources:
  - id: sap_raw
    projectId: YOUR_SOURCE_PROJECT_ID
    datasetId: cortex_sap_raw

targets:
  - id: sap_foundation
    projectId: YOUR_TARGET_PROJECT_ID
    datasetId: cortex7_sap_data_foundation

다음 표에서는 데이터 소스 및 타겟 매핑 매개변수를 설명합니다.

매개변수 의미 기본값 설명
data.sources.id Source ID(소스 ID) - 데이터를 가져올 소스 데이터 세트의 'id'를 정의합니다. 예를 들면 sap_raw입니다.
data.sources.projectId 소스 프로젝트 ID YOUR_SOURCE_PROJECT_ID 소스 데이터가 있는 Google Cloud 프로젝트 ID를 참조합니다.
data.sources.datasetId 소스 BigQuery 데이터 세트 ID - 소스 데이터가 있는 BigQuery 데이터 세트 ID를 참조합니다. 예를 들면 cortex_sap_raw입니다.
data.targets.id 대상 ID - 대상 데이터 세트의 'id'를 정의합니다. 예를 들면 sap_foundation입니다.
data.targets.projectId 대상 프로젝트 ID YOUR_TARGET_PROJECT_ID 대상 데이터의 Google Cloud 프로젝트 ID를 참조합니다.
data.targets.datasetId 타겟 BigQuery 데이터 세트 ID - 타겟 데이터의 BigQuery 데이터 세트 ID를 참조합니다. 예를 들면 cortex7_sap_data_foundation입니다.

데이터: 모듈

모듈은 Dataform 데이터 파이프라인의 구조와 구성요소를 정의합니다.

데이터: 모듈: 파운데이션

이 섹션에서는 원시 레이어 (CDC 스트림)의 데이터를 소스 데이터의 표준화된 최신 레코드 표현으로 처리하는 데이터 파운데이션 레이어 모듈을 구성합니다. 소스에서 최신 레코드에 대한 뷰를 직접 제공하거나 소스 시스템 커넥터에서 이러한 변환을 실행하는 경우 모듈을 외부 데이터 기반 소스로 구성할 수 있습니다.

modules:
  # List of foundation modules.
  foundation:
    # Unique identifier for the module instance.
    - moduleId: erp
      # Type of the module (namespaced, for example, cortex.sap).
      type: cortex.sap
      # Reference to the source dataset ID.
      dataSourceId: sap_raw
      # Reference to the target dataset ID.
      dataTargetId: sap_foundation
      # Module-specific configuration settings.
      moduleSettings:
        # SAP version (for example, ecc, s4).
        sapVersion: ecc
        # SAP client number.
        mandt: "100"
      # Whether the module is enabled.
      # enabled: true
      # Whether the foundation is external (does not create target dataset).
      # external: false
      # Custom table settings file, relative to 'config/' file directory
      # Recommended path: '{namespace}/data_foundation/{data_foundation_module_type}/table_settings.yaml'
      # Default path: '../src/data_modules/{namespace}/data_foundation/{data_foundation_module_type}/table_settings.default.yaml'
      # tableSettings: "custom_datafoundation_table_settings.yaml"

다음 표에서는 modules.foundation 구성의 데이터 기반 모듈 매개변수를 설명합니다.

매개변수 의미 기본값 설명
moduleId 모듈 식별자 erp 특정 데이터 파운데이션 변환 모듈 인스턴스의 고유 식별자입니다.
type 모듈 논리 유형 cortex.sap 적용된 비즈니스 로직 또는 템플릿을 정의합니다 (예: cortex.sap).
dataSourceId 소스 링크 sap_raw data.sources 목록의 'id'를 참조하여 데이터를 가져옵니다.
dataTargetId 타겟 링크 sap_foundation 데이터를 푸시할 대상 목록의 'id'를 참조합니다.
moduleSettings.sapVersion SAP 시스템 버전 ecc SAP 데이터 소스에만 적용됩니다. ecc (ECC) 또는 s4 (S/4HANA) 시스템의 소스별 로직을 결정합니다.