본문으로 건너뛰기
cccskills
무료GitHub에 공개

yaml-development

Develop and troubleshoot Apache Beam's YAML SDK. Understand its source files, run data processing pipelines locally or on Dataflow, test changes, and investigate provider issues or mismatched record fields.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Guides YAML SDK development in Apache Beam, including environment setup, testing, and key concepts. Use when working with Beam YAML code in sdks/python/apache_beam/yaml/.

연동 도구DockerMongoDB
설치 방법 보기

이럴 때 유용합니다

  • Find source files for Beam YAML changes
  • Run a YAML pipeline locally or on Dataflow
  • Run unit tests and external service integration tests
  • Investigate Java integration failures and schema mismatches

포함된 파일(1)

  • SKILL.md4.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

YAML Development in Apache Beam

Project Structure

Key Files in sdks/python/apache_beam/yaml/

  • integration_tests.py - Runs integration tests defined in YAML files or using testcontainers.
  • main.py - Entry point for running YAML pipelines from the command line.
  • pipeline.schema.yaml - JSON schema defining the valid structure for Beam YAML pipelines.
  • standard_io.yaml - Declarations of standard IO transforms and their mappings to providers.
  • standard_providers.yaml - Configuration for standard providers (e.g., Java expansion services).
  • yaml_combine.py - Implementations for aggregation and combining operations.
  • yaml_io.py - Mappings and logic for IO transforms (e.g., PubSub, BigQuery, Iceberg).
  • yaml_join.py - Implementations for join operations.
  • yaml_mapping.py - Implementations for mapping operations (e.g., MapToFields).
  • yaml_provider.py - Manages providers (Python, Java cross-language) that implement transforms.
  • yaml_transform.py - Core YAML expansion logic, parsing, and translation to Beam pipelines.

Environment Setup

Since Beam YAML is implemented within the Python SDK, the environment setup is identical to Python development. Refer to the python-development skill for details on using pyenv and installing in editable mode (e.g., use pip install -e sdks/python[gcp,test] from the root directory).

Running YAML Pipelines

You can run Beam YAML pipelines using the main.py script in the YAML directory.

Using main.py directly

python -m apache_beam.yaml.main --yaml_pipeline_file=/path/to/pipeline.yaml [pipeline_options]

Example: Running locally

python -m apache_beam.yaml.main \
  --yaml_pipeline_file=sdks/python/apache_beam/yaml/examples/simple_filter.yaml \
  --runner=DirectRunner

Example: Running on Dataflow

python -m apache_beam.yaml.main \
  --yaml_pipeline_file=sdks/python/apache_beam/yaml/examples/simple_filter.yaml \
  --runner=DataflowRunner \
  --project=my-project \
  --region=us-central1 \
  --temp_location=gs://my-bucket/temp

Running Tests

Unit Tests

Beam YAML has extensive unit tests covering parsing, expansion, and specific transforms.

# Run all tests in a file
pytest sdks/python/apache_beam/yaml/yaml_transform_test.py

# Run a specific test
pytest sdks/python/apache_beam/yaml/yaml_transform_test.py::YamlTransformTest::test_simple_pipeline

Integration Tests

Integration tests often spin up Docker containers (via testcontainers) for external services like MongoDB, Kafka, or databases.

# Run integration tests matching a specific keyword (e.g., mongodb)
pytest sdks/python/apache_beam/yaml/integration_tests.py -k mongodb

Key Concepts

Providers

Beam YAML uses "providers" to find implementations for transforms requested in the YAML file.

  • Inline/Python Providers: Leverage Python functions or PTransforms directly.
  • Java/External Providers: Use Beam's cross-language capabilities to invoke Java transforms via an expansion service.

Preprocessing

Before execution, a YAML pipeline is preprocessed to resolve schemas, match transforms to providers, and expand shorthand notations (like chain or source/sink composites).

Common Issues

Cross-language Failures

If a test requires a Java transform, ensure that:

  1. Docker is running (if using testcontainers).
  2. The correct expansion service is available or can be started.
  3. Java environment is correctly configured (sometimes requires specific Java versions like Java 17/21).

Schema Mismatches

YAML relies heavily on Beam schemas. Ensure that fields produced by a transform match the fields expected by the next transform. Use explicit mapping if necessary.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Guides adding metadata, extra information attached to data elements, to Apache Beam's WindowedValue. Maps the changes needed across serialization, storage, processing, and runner interfaces so new fields remain available during pipeline execution.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding trace context or drain flags to WindowedValue
  • Checking metadata preservation through Windmill storage
  • Reviewing propagation through grouping and timers
apache/beam8.7천2026년 10월 19일 업데이트

Learn Apache Beam's core concepts through Java and Python examples. Understand distributed datasets, processing steps, pipeline execution, and time windows, with guidance on aggregation, late data, error handling, and sharing processing steps across languages.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Learn how Pipeline, PCollection, and PTransform fit together
  • Understand grouping, aggregation, merging, and splitting
  • Study time windows, output timing, and late data
apache/beam8.7천2026년 10월 19일 업데이트

ci-cd

무료

Helps investigate and modify Apache Beam's automated build and test workflows in GitHub Actions. Explains workflow types, failure logs, targeted reruns, local reproduction, and the cloud credentials needed for workflows that access GCP.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Investigating failed checks on a pull request
  • Rerunning a specific test workflow
  • Reproducing CI test commands locally
apache/beam8.7천2026년 10월 19일 업데이트

Navigate Apache Beam contributions from finding an issue to submitting a pull request, a proposed code change, and responding to reviews. Covers environment setup, tests, formatting, licensing requirements, and closer evaluation of changes to core components.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Prepare a first Apache Beam contribution
  • Organize a pull request and its related issue
  • Check tests and formatting before submission
apache/beam8.7천2026년 10월 19일 업데이트

Build Apache Beam connectors that read and write external data. This guide covers Java implementation, schema support for structured records, access from Python and Go, Managed API integration, and testing.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Add a connector for an external data system
  • Make a Java connector available to Python and Go
  • Integrate a connector with Beam YAML and the Managed API
apache/beam8.7천2026년 10월 19일 업데이트

Build and test Apache Beam with Gradle, the system that manages its project tasks. Find relevant configuration files, inspect library dependencies, run formatting checks, publish locally, and investigate build failures.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Build or test a specific Apache Beam module
  • Inspect library dependencies and version conflicts
  • Run formatting and pre-commit checks
apache/beam8.7천2026년 10월 19일 업데이트

apache의 스킬 모두 보기

이 스킬의 문제 신고