Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] Enrichment Transform v1 #29782

Closed
wants to merge 21 commits into from

Conversation

riteshghorse
Copy link
Contributor

@riteshghorse riteshghorse commented Dec 15, 2023

Implemented enrichment transform

Part of #29787


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.

@riteshghorse
Copy link
Contributor Author

Run Python_Integration PreCommit 3.8

@riteshghorse
Copy link
Contributor Author

Run Python 3.9 PostCommit

@riteshghorse
Copy link
Contributor Author

Run Python 3.8 PostCommit

@riteshghorse
Copy link
Contributor Author

Run Python 3.11 PostCommit

@riteshghorse riteshghorse marked this pull request as ready for review December 20, 2023 18:51
@riteshghorse
Copy link
Contributor Author

Run Python 3.11 PostCommit

Copy link
Contributor

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

Copy link
Contributor

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

R: @jrmccluskey for label python.
R: @chamikaramj for label io.

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).

@riteshghorse
Copy link
Contributor Author

riteshghorse commented Dec 21, 2023

R: @damccorm (since Cham is OOO until new year's). No rush though!

Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

test_pipeline
| 'Create PCollection' >> beam.Create([req])
| 'Enrichment Transform' >> Enrichment(client))
self.assertIsNotNone(output)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have some more extensive testing here. Specifically:

  1. We should test that the join works (so this should validate the output pcollection)
  2. We should test a custom join

I'd feel even better if we could validate some of the other behaviors (e.g. retry strategy) so that from an interface perspective we could swap out rrio and be confident everything works if needed, though that is not required if difficult

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be doable within this PR itself. I'll add that!

sdks/python/apache_beam/transforms/enrichment.py Outdated Show resolved Hide resolved
Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM, just had a few lingering comments - sorry for the slow review, missed that this was waiting for me

sdks/python/apache_beam/io/requestresponse.py Outdated Show resolved Hide resolved
sdks/python/apache_beam/transforms/enrichment.py Outdated Show resolved Hide resolved
Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@riteshghorse
Copy link
Contributor Author

Run Python 3.8 PostCommit

@riteshghorse
Copy link
Contributor Author

CC: @robertwb

(I had a offline chat with Robert. It would be to good to have the params as declarative and beam.Row as input/output type for cross-lang usage. I'll have that changes with Throttler in next PR.)

@riteshghorse
Copy link
Contributor Author

I ended up having the beam.Row change in BigTable branch to test if that passes as well. I raised #30001 with the more complete flow of enrichment. The enrichment files from this PR hasn't change much so I would like to get #30001 reviewed instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants