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

Add test code to overwrite SQL in Beam Python JDBC #30417

Conversation

case-k-git
Copy link
Contributor

@case-k-git case-k-git commented Feb 26, 2024

Please add a meaningful description for your change here

Add a test to overwrite SQL in Python JDBC. Previously(when I checked 2022-01-04), there was a bug where queries were not being overwritten, but upon checking now, it has been improved.I add the test code to overwrite SQL to close the related issue.

fixes #20446

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.

@case-k-git case-k-git changed the title Add python jdbc test with override query Add test code to overwrite SQL in Beam Python JDBC Feb 26, 2024
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: @bvolpato 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).

@case-k-git case-k-git marked this pull request as draft February 26, 2024 22:40
@case-k-git case-k-git force-pushed the feature/add-jdbc-python-query-overwrite-test branch 2 times, most recently from ed2b26a to 1a12a43 Compare February 27, 2024 01:57
@case-k-git case-k-git force-pushed the feature/add-jdbc-python-query-overwrite-test branch from dea70be to 2b1f5e8 Compare February 27, 2024 02:59
@case-k-git case-k-git marked this pull request as ready for review February 27, 2024 02:59
@jrmccluskey
Copy link
Contributor

From Python Lint precommit:

************* Module apache_beam.io.external.xlang_jdbcio_it_test
apache_beam/io/external/xlang_jdbcio_it_test.py:29:0: C0411: third party import "from parameterized import parameterized" should be placed before "from apache_beam import DoFn, ParDo" (wrong-import-order)

please fix

@case-k-git case-k-git force-pushed the feature/add-jdbc-python-query-overwrite-test branch from f555e8c to bbb6c2b Compare February 28, 2024 06:08
@case-k-git
Copy link
Contributor Author

case-k-git commented Feb 28, 2024

Hi @jrmccluskey
Thank you for your review. I fix lint.
bbb6c2b

Copy link
Contributor

@jrmccluskey jrmccluskey left a comment

Choose a reason for hiding this comment

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

LGTM

@jrmccluskey jrmccluskey merged commit 2b8a737 into apache:master Mar 4, 2024
72 checks passed
@Abacn
Copy link
Contributor

Abacn commented Mar 6, 2024

The test failed:

ValueError: Type names and field names must be valid identifiers: 'count(*)'
a = (<apache_beam.io.external.xlang_jdbcio_it_test.CrossLanguageJdbcIOTest testMethod=test_xlang_jdbc_write_read_1_mysql>,)
kw = {}

Abacn added a commit that referenced this pull request Mar 6, 2024
Abacn added a commit that referenced this pull request Mar 6, 2024
@Abacn Abacn mentioned this pull request Mar 6, 2024
3 tasks
MelodyShen pushed a commit to MelodyShen/beam that referenced this pull request Mar 20, 2024
* Add python jdbc test with override query

* fix jdbcio it test lint
MelodyShen pushed a commit to MelodyShen/beam that referenced this pull request Mar 20, 2024
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.

Add external transform JDBC it tests with overridden statement/query
3 participants