[ 
https://issues.apache.org/jira/browse/BEAM-10785?focusedWorklogId=764748&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-764748
 ]

ASF GitHub Bot logged work on BEAM-10785:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/May/22 08:29
            Start Date: 01/May/22 08:29
    Worklog Time Spent: 10m 
      Work Description: harrydrippin opened a new pull request, #17518:
URL: https://github.com/apache/beam/pull/17518

   This PR fixes BEAM-10785 by adding the `coder` argument from 
`WriteToBigQuery` to `JsonRowWriter` to enable users to modify the coder for 
various reasons on batch pipeline. The `coder` argument will be defaulted to 
`RowAsDictJsonCoder` if user didn't specify.
   
   This modification needs to add `coder` argument on below classes and 
functions. This PR also applies changes for them.
   
   * `BigQueryBatchFileLoads`
   * `WriteRecordsToFile`
   * `WriteGroupedRecordsToFile`
   * `_make_new_file_writer()`
   * `JsonRowWriter`
   
   This version was tested on `DataflowRunner` and there were no any problems 
while using custom coder. But this PR does not have any additional unit tests 
now, so it will be great if reviewers can provide some directions about 
appropriate unit tests. Please let me know if there are any concerns on this 
PR. Thank you!
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   
    - [x] [**Choose 
reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and 
mention them in a comment (`R: @username`).
    - [x] Format the pull request title like `[BEAM-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA 
issue, if applicable. This will automatically link the pull request to the 
issue.
    - [x] Update `CHANGES.md` with noteworthy changes.
    - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more 
tips on [how to make review process 
smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier).
   
   To check the build health, please visit 
[https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](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](https://github.com/apache/beam/workflows/Build%20python%20source%20distribution%20and%20wheels/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python 
tests](https://github.com/apache/beam/workflows/Python%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java 
tests](https://github.com/apache/beam/workflows/Java%20Tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more 
information about GitHub Actions CI.
   




Issue Time Tracking
-------------------

            Worklog Id:     (was: 764748)
    Remaining Estimate: 0h
            Time Spent: 10m

> Support for coder argument in WriteToBigQuery
> ---------------------------------------------
>
>                 Key: BEAM-10785
>                 URL: https://issues.apache.org/jira/browse/BEAM-10785
>             Project: Beam
>          Issue Type: Bug
>          Components: io-py-gcp
>            Reporter: Nakamura Yu
>            Priority: P1
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When using WriteToBigQuery to transfer data to BigQuery, non-ascii characters 
> are replaced with replacement characters.
> This was due to the RowAsDictJsonCoder being set as the coder for the 
> BigQueryBatchFileLoads called inside WriteToBigQuery.
> I want to add coder to the argument of WriteToBigQuery so that I can set a 
> coder other than RowAsDictJsonCoder.
> If no problem, I will create a Pull Request next weekend.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to