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

[yaml] Add use cases for Enrichment transform in YAML #32289

Merged
merged 15 commits into from
Dec 16, 2024

Conversation

reeba212
Copy link
Contributor

  1. Added a simple bigtable enrichment example
  2. Added an end to end use case that demonstrates how spanner IO and enrichment transform coupled with other YAML transforms can be used in a real world setting

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 reeba212 changed the title Add use-cases for Enrichment transform in YAML [yaml] Add use cases for Enrichment transform in YAML Aug 22, 2024
Copy link
Contributor

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

R: @damccorm for label python.
R: @ahmedabu98 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).

Copy link
Contributor

@Polber Polber left a comment

Choose a reason for hiding this comment

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

Thanks! Added a few comments

sdks/python/apache_beam/io/gcp/bigquery_tools.py Outdated Show resolved Hide resolved
Comment on lines 77 to 78
options:
project_id: "apache-beam-testing"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this necessary? It is defined in all the transforms, so not sure why it would be required

Copy link
Contributor

@Polber Polber left a comment

Choose a reason for hiding this comment

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

Just a couple small changes, thanks!

sdks/python/apache_beam/io/gcp/bigquery_tools.py Outdated Show resolved Hide resolved
sdks/python/apache_beam/yaml/integration_tests.py Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Sep 5, 2024

Reminder, please take a look at this pr: @damccorm @ahmedabu98

Copy link
Contributor

github-actions bot commented Sep 9, 2024

Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:

R: @liferoad for label python.
R: @johnjcasey 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)

Copy link
Contributor

Reminder, please take a look at this pr: @liferoad @johnjcasey

Copy link
Contributor

Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:

R: @tvalentyn for label python.
R: @Abacn 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)

@damccorm
Copy link
Contributor

@Polber what are next steps on this PR?

@reeba212 it looks like some precommit checks are failing - would you mind taking a look? At a glance, I see:

  1. the RAT license check is missing - this is because some files are missing the Apache license
  2. Lint/format checks are failing - could you try https://cwiki.apache.org/confluence/display/BEAM/Python+Tips#PythonTips-LintandFormattingChecks
  3. test_bigtable_enrichment_yaml seems to be failing

@damccorm
Copy link
Contributor

damccorm commented Oct 3, 2024

@Polber @reeba212 friendly reminder to please take a look at this one when you have a chance

@reeba212 reeba212 force-pushed the spanner-enrichment-use-case branch from f5d0aa3 to b4aa22f Compare December 4, 2024 10:01
@Polber Polber mentioned this pull request Dec 6, 2024
3 tasks
Copy link
Contributor

@Polber Polber left a comment

Choose a reason for hiding this comment

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

Left some comments which should fix errors

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, but I had one question

client=None,
temp_dataset_id=None,
temp_table_ref=None,
project_id=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we do anything with this project_id?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From what I remember, running the code without assigning project_id resulted in the following error:
OSError: Project ID was not passed and could not be determined from the environment.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it is actually getting assigned, though, and other functions take in project_id as parameters. If it is passed in to initialize the object, I think it will be ignored as written

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I see. Should I go ahead and remove it, then?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, lets go ahead and get rid of it - thanks

@damccorm
Copy link
Contributor

Failing tests are unrelated to the PR, merging - thanks!

@damccorm damccorm merged commit f77efba into apache:master Dec 16, 2024
86 of 92 checks passed
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.

3 participants