beam icon indicating copy to clipboard operation
beam copied to clipboard

[yaml] Add enrichment transform to Beam YAML

Open reeba212 opened this issue 1 year ago • 1 comments

  1. Added enrichment transform
  2. Registered it in standard_providers.yaml
  3. Added integration and unit tests for enrichment transform

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • [ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • [ ] Update CHANGES.md with noteworthy changes.
  • [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels Python tests Java tests Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

reeba212 avatar Aug 22 '24 17:08 reeba212

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

github-actions[bot] avatar Aug 22 '24 20:08 github-actions[bot]

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @shunping for label python.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

github-actions[bot] avatar Sep 19 '24 16:09 github-actions[bot]

Thanks for contributing to Beam, @reeba212!

I see there is some lint problem you will need to fix in your code: https://github.com/apache/beam/actions/runs/10944933393/job/30387980829?pr=32286

Then, I also see the errors on when import feast package. Currently feast is not on our dependency list (i.e. setup.py), that's why those tests fail.

target/.tox-py310-cloud/py310-cloud/lib/python3.10/site-packages/apache_beam/yaml/yaml_enrichment.py:22: in <module>
    from apache_beam.transforms.enrichment_handlers.feast_feature_store import FeastFeatureStoreEnrichmentHandler
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    #
    # Licensed to the Apache Software Foundation (ASF) under one or more
    # contributor license agreements.  See the NOTICE file distributed with
    # this work for additional information regarding copyright ownership.
    # The ASF licenses this file to You under the Apache License, Version 2.0
    # (the "License"); you may not use this file except in compliance with
    # the License.  You may obtain a copy of the License at
    #
    #    http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    #
    import logging
    import tempfile
    from pathlib import Path
    from typing import Any
    from typing import Callable
    from typing import List
    from typing import Mapping
    from typing import Optional
    
    import apache_beam as beam
    from apache_beam.io.filesystems import FileSystems
    from apache_beam.transforms.enrichment import EnrichmentSourceHandler
    from apache_beam.transforms.enrichment_handlers.utils import ExceptionLevel
>   from feast import FeatureStore
E   ModuleNotFoundError: No module named 'feast'

target/.tox-py310-cloud/py310-cloud/lib/python3.10/site-packages/apache_beam/transforms/enrichment_handlers/feast_feature_store.py:30: ModuleNotFoundError

@Polber, what's the plan for supporting the enrichment transform? To make tests green, we have a few options. For example:

  • including feast as the standard dependency of beam,
  • decorating yaml tests with "@pytest.mark.uses_feast", or
  • totally ignoring the feast handler.

What do you think?

shunping avatar Sep 19 '24 18:09 shunping

Reminder, please take a look at this pr: @shunping

github-actions[bot] avatar Sep 27 '24 12:09 github-actions[bot]

@robertwb Do you mind taking another look?

Polber avatar Oct 08 '24 19:10 Polber

Reminder, please take a look at this pr: @shunping

github-actions[bot] avatar Oct 16 '24 12:10 github-actions[bot]