Guide on how to add and propagate new metadata fields in Apache Beam's WindowedValue, extending protos, windmill persistence, and runner interfaces to avoid metadata loss.
日本語の概要は準備中です。原文の説明を表示しています。
Guides Python SDK development in Apache Beam, including environment setup, testing, building, and running pipelines. Use when working with Python code in sdks/python/.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
sdks/python/ - Python SDK root
apache_beam/ - Main Beam package
transforms/ - Core transforms (ParDo, GroupByKey, etc.)io/ - I/O connectorsml/ - Beam ML code (RunInference, etc.)runners/ - Runner implementations and wrappersrunners/worker/ - SDK worker harnesscontainer/ - Docker container configurationtest-suites/ - Test configurationsscripts/ - Utility scriptssetup.py - Package configurationpyproject.toml - Build configurationtox.ini - Test automationpytest.ini - Pytest configurationruff.toml - Linting rules.isort.cfg - Import sortingpyrefly.toml - Type checking# Install Python
pyenv install 3.X # Use supported version from gradle.properties
# Create virtual environment
pyenv virtualenv 3.X beam-dev
pyenv activate beam-dev
cd sdks/python
pip install -e .[gcp,test]
pip install pre-commit
pre-commit install
# To disable
pre-commit uninstall
*_test.py)# Run all tests in a file
pytest -v apache_beam/io/textio_test.py
# Run tests in a class
pytest -v apache_beam/io/textio_test.py::TextSourceTest
# Run a specific test
pytest -v apache_beam/io/textio_test.py::TextSourceTest::test_progress
*_it_test.py)python -m pytest -o log_cli=True -o log_level=Info \
apache_beam/ml/inference/pytorch_inference_it_test.py::PyTorchInference \
--test-pipeline-options='--runner=TestDirectRunner'
# First build SDK tarball
pip install build && python -m build --sdist
# Run integration test
python -m pytest -o log_cli=True -o log_level=Info \
apache_beam/ml/inference/pytorch_inference_it_test.py::PyTorchInference \
--test-pipeline-options='--runner=TestDataflowRunner --project=<project>
--temp_location=gs://<bucket>/tmp
--sdk_location=dist/apache-beam-2.XX.0.dev0.tar.gz
--region=us-central1'
cd sdks/python
pip install build && python -m build --sdist
# Output: sdks/python/dist/apache-beam-X.XX.0.dev0.tar.gz
./gradlew :sdks:python:bdistPy311linux # For Python 3.11 on Linux
./gradlew :sdks:python:container:py311:docker \
-Pdocker-repository-root=gcr.io/your-project/your-name \
-Pdocker-tag=custom \
-Ppush-containers
# Container image will be pushed to: gcr.io/your-project/your-name/beam_python3.11_sdk:custom
To use this container image, supply it via --sdk_container_image.
# Install modified SDK
pip install /path/to/apache-beam.tar.gz[gcp]
# Run pipeline
python my_pipeline.py \
--runner=DataflowRunner \
--sdk_location=/path/to/apache-beam.tar.gz \
--project=my_project \
--region=us-central1 \
--temp_location=gs://my-bucket/temp
NameError when running DoFnGlobal imports, functions, and variables in the main pipeline module are not serialized by default. Use:
--save_main_session
Use --requirements_file=requirements.txt or custom containers.
@pytest.mark.it_postcommit - Include in PostCommit test suite# Run WordCount
./gradlew :sdks:python:wordCount
# Check environment
./gradlew :checkSetup
# Linting
ruff check apache_beam/
# Type checking
pyrefly check apache_beam/
# Formatting (via yapf)
yapf -i apache_beam/file.py
# Import sorting
isort apache_beam/file.py
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Guide on how to add and propagate new metadata fields in Apache Beam's WindowedValue, extending protos, windmill persistence, and runner interfaces to avoid metadata loss.
日本語の概要は準備中です。原文の説明を表示しています。
Explains core Apache Beam programming model concepts including PCollections, PTransforms, Pipelines, and Runners. Use when learning Beam fundamentals or explaining pipeline concepts.
日本語の概要は準備中です。原文の説明を表示しています。
Guides understanding and working with Apache Beam's CI/CD system using GitHub Actions. Use when debugging CI failures, understanding test workflows, or modifying CI configuration.
日本語の概要は準備中です。原文の説明を表示しています。
Guides the contribution workflow for Apache Beam, including creating PRs, issue management, code review process, release cycles, and rigorous evaluation rules for high-risk core component changes. Use when contributing code, creating PRs, or modifying core Beam components.
日本語の概要は準備中です。原文の説明を表示しています。
End-to-end guide on developing new Apache Beam I/O connectors correctly, including core IO transforms, SchemaTransforms, URN proto definitions, Managed API integration, cross-language expansion service, and testing.
日本語の概要は準備中です。原文の説明を表示しています。
Guides understanding and using the Gradle build system in Apache Beam. Use when building projects, understanding dependencies, or troubleshooting build issues.
日本語の概要は準備中です。原文の説明を表示しています。