beam icon indicating copy to clipboard operation
beam copied to clipboard

Allow non-repeated JSON fields for BigQuery FILE_LOADS

Open ahmedabu98 opened this issue 2 years ago • 8 comments

JSON insertion via batch loads has until recently only been supported via CSV format. It is now supported with JSON and Avro format (see here for documentation).

It does not seem to allow repeated JSON fields, however. These changes allow JSON writes with FILE_LOADS but still throw an early error when detecting repeated JSON fields.


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

  • [ ] Choose reviewer(s) and mention them in a comment (R: @username).
  • [ ] 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

See CI.md for more information about GitHub Actions CI.

ahmedabu98 avatar Jul 14 '22 16:07 ahmedabu98

Codecov Report

Merging #22272 (edd62ac) into master (d54841c) will increase coverage by 1.06%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #22272      +/-   ##
==========================================
+ Coverage   74.24%   75.31%   +1.06%     
==========================================
  Files         702      741      +39     
  Lines       92999   108442   +15443     
==========================================
+ Hits        69045    81670   +12625     
- Misses      22687    25505    +2818     
  Partials     1267     1267              
Flag Coverage Δ
python 83.26% <ø> (-0.36%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
sdks/python/apache_beam/io/gcp/bigquery.py 76.10% <ø> (+5.73%) :arrow_up:
sdks/python/apache_beam/typehints/__init__.py 71.42% <0.00%> (-28.58%) :arrow_down:
...he_beam/examples/cookbook/multiple_output_pardo.py 69.51% <0.00%> (-26.33%) :arrow_down:
...python/apache_beam/examples/wordcount_debugging.py 70.51% <0.00%> (-25.41%) :arrow_down:
...s/python/apache_beam/examples/wordcount_minimal.py 68.88% <0.00%> (-23.97%) :arrow_down:
sdks/python/apache_beam/examples/wordcount.py 70.83% <0.00%> (-22.28%) :arrow_down:
sdks/python/apache_beam/testing/test_utils.py 90.52% <0.00%> (-9.48%) :arrow_down:
sdks/python/apache_beam/utils/python_callable.py 90.32% <0.00%> (-7.72%) :arrow_down:
sdks/python/apache_beam/examples/complete/tfidf.py 92.64% <0.00%> (-5.75%) :arrow_down:
...examples/inference/sklearn_mnist_classification.py 42.30% <0.00%> (-5.20%) :arrow_down:
... and 154 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Jul 14 '22 17:07 codecov[bot]

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

R: @y1chi 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 Jul 14 '22 18:07 github-actions[bot]

R: @johnjcasey R: @chamikaramj

ahmedabu98 avatar Jul 14 '22 20:07 ahmedabu98

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

github-actions[bot] avatar Jul 14 '22 20:07 github-actions[bot]

Run Python PreCommit

chamikaramj avatar Jul 27 '22 21:07 chamikaramj

Run Python PreCommit

chamikaramj avatar Jul 29 '22 19:07 chamikaramj

Run Python PreCommit

ahmedabu98 avatar Aug 02 '22 20:08 ahmedabu98

Run Python PreCommit

ahmedabu98 avatar Aug 05 '22 22:08 ahmedabu98

retest this please

ahmedabu98 avatar Sep 02 '22 16:09 ahmedabu98

FYI repeated JSON values are available. Updating the scope to include writing any JSON data with file loads

ahmedabu98 avatar Sep 02 '22 16:09 ahmedabu98

Run Java_GCP_IO_Direct PreCommit

ahmedabu98 avatar Sep 06 '22 19:09 ahmedabu98

What's the status here ? Should this be merged ?

chamikaramj avatar Nov 23 '22 00:11 chamikaramj

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Jan 28 '23 12:01 github-actions[bot]

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Mar 30 '23 12:03 github-actions[bot]

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Jun 08 '23 12:06 github-actions[bot]

This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

github-actions[bot] avatar Jun 15 '23 12:06 github-actions[bot]