You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "damondouglas (via GitHub)" <gi...@apache.org> on 2023/03/03 04:55:21 UTC

[GitHub] [beam] damondouglas opened a new pull request, #25706: [25705] Refactor BigQuery SchemaTransforms naming

damondouglas opened a new pull request, #25706:
URL: https://github.com/apache/beam/pull/25706

   This PR closes #25705 by
   - Rename provider classes and configuration
   - Rename identifiers
   - Add the `@AutoService(SchemaProvider.class)` annotation
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [x] 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](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/get-started-contributing/#make-the-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)
   [![Go tests](https://github.com/apache/beam/workflows/Go%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Go+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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damondouglas commented on pull request #25706: [25705] Refactor BigQuery SchemaTransforms naming

Posted by "damondouglas (via GitHub)" <gi...@apache.org>.
damondouglas commented on PR #25706:
URL: https://github.com/apache/beam/pull/25706#issuecomment-1462392876

   Run Java_Examples_Dataflow_Java11 PreCommit


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damondouglas commented on pull request #25706: [25705] Refactor BigQuery SchemaTransforms naming

Posted by "damondouglas (via GitHub)" <gi...@apache.org>.
damondouglas commented on PR #25706:
URL: https://github.com/apache/beam/pull/25706#issuecomment-1462393200

   Run Java_Examples_Dataflow_Java17 PreCommit


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] ahmedabu98 commented on pull request #25706: [25705] Refactor BigQuery SchemaTransforms naming

Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on PR #25706:
URL: https://github.com/apache/beam/pull/25706#issuecomment-1453850452

   Also, there's a `../gcp/bigquery/providers` now, can you move these under there?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] ahmedabu98 commented on pull request #25706: [25705] Refactor BigQuery SchemaTransforms naming

Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on PR #25706:
URL: https://github.com/apache/beam/pull/25706#issuecomment-1467079380

   LGTM


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damondouglas commented on pull request #25706: [25705] Refactor BigQuery SchemaTransforms naming

Posted by "damondouglas (via GitHub)" <gi...@apache.org>.
damondouglas commented on PR #25706:
URL: https://github.com/apache/beam/pull/25706#issuecomment-1456846525

   > Also, there's a `../gcp/bigquery/providers` directory now, can you move these files under there?
   
   I like the idea of organizing into a single folder providers.  However, I looked into this but many of the tests used BigQueryIO related testing utilities that would require that I change their modifiers to public.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damondouglas commented on pull request #25706: [25705] Refactor BigQuery SchemaTransforms naming

Posted by "damondouglas (via GitHub)" <gi...@apache.org>.
damondouglas commented on PR #25706:
URL: https://github.com/apache/beam/pull/25706#issuecomment-1461160668

   Run Java_GCP_IO_Direct PreCommit


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damondouglas commented on pull request #25706: [25705] Refactor BigQuery SchemaTransforms naming

Posted by "damondouglas (via GitHub)" <gi...@apache.org>.
damondouglas commented on PR #25706:
URL: https://github.com/apache/beam/pull/25706#issuecomment-1456844021

   Run Java_GCP_IO_Direct PreCommit


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damondouglas commented on pull request #25706: [25705] Refactor BigQuery SchemaTransforms naming

Posted by "damondouglas (via GitHub)" <gi...@apache.org>.
damondouglas commented on PR #25706:
URL: https://github.com/apache/beam/pull/25706#issuecomment-1456985521

   R: ahmedabu98


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] Abacn commented on pull request #25706: [25705] Refactor BigQuery SchemaTransforms naming

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on PR #25706:
URL: https://github.com/apache/beam/pull/25706#issuecomment-1467096586

   Ideally shouldn't different read or write methods just being a field of the schema transform? Or if they're so different that different provider are needed. I'm fine with this change as it clean up existing namings. Merging for now


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damondouglas commented on a diff in pull request #25706: [25705] Refactor BigQuery SchemaTransforms naming

Posted by "damondouglas (via GitHub)" <gi...@apache.org>.
damondouglas commented on code in PR #25706:
URL: https://github.com/apache/beam/pull/25706#discussion_r1128130768


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryExportSchemaTransformConfiguration.java:
##########
@@ -28,7 +28,7 @@
 /**
  * Configuration for reading from BigQuery.
  *
- * <p>This class is meant to be used with {@link BigQueryReadSchemaTransformProvider}.
+ * <p>This class is meant to be used with {@link BigQueryExportSchemaTransformProvider}.

Review Comment:
   Naming is hard and I really like your ideas.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] Abacn merged pull request #25706: [25705] Refactor BigQuery SchemaTransforms naming

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn merged PR #25706:
URL: https://github.com/apache/beam/pull/25706


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] ahmedabu98 commented on a diff in pull request #25706: [25705] Refactor BigQuery SchemaTransforms naming

Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on code in PR #25706:
URL: https://github.com/apache/beam/pull/25706#discussion_r1128101888


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryExportSchemaTransformConfiguration.java:
##########
@@ -28,7 +28,7 @@
 /**
  * Configuration for reading from BigQuery.
  *
- * <p>This class is meant to be used with {@link BigQueryReadSchemaTransformProvider}.
+ * <p>This class is meant to be used with {@link BigQueryExportSchemaTransformProvider}.

Review Comment:
   Should still keep "Read" in there: `BigQueryExportReadSchemaTransformProvider`



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryFileLoadsSchemaTransformConfiguration.java:
##########
@@ -27,25 +27,25 @@
 /**
  * Configuration for writing to BigQuery.
  *
- * <p>This class is meant to be used with {@link BigQueryWriteSchemaTransformProvider}.
+ * <p>This class is meant to be used with {@link BigQueryFileLoadsWriteSchemaTransformProvider}.
  *
  * <p><b>Internal only:</b> This class is actively being worked on, and it will likely change. We
  * provide no backwards compatibility guarantees, and it should not be implemented outside the Beam
  * repository.
  */
 @DefaultSchema(AutoValueSchema.class)
 @AutoValue
-public abstract class BigQueryWriteSchemaTransformConfiguration {
+public abstract class BigQueryFileLoadsSchemaTransformConfiguration {

Review Comment:
   wdyt of `BigQueryFileLoadsWriteSchemaTransformConfiguration`? better to keep provider and configuration name consistent



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] github-actions[bot] commented on pull request #25706: [25705] Refactor BigQuery SchemaTransforms naming

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25706:
URL: https://github.com/apache/beam/pull/25706#issuecomment-1453000905

   Assigning reviewers. If you would like to opt out of this review, comment `assign to next reviewer`:
   
   R: @kennknowles for label java.
   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).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] ahmedabu98 commented on pull request #25706: [25705] Refactor BigQuery SchemaTransforms naming

Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on PR #25706:
URL: https://github.com/apache/beam/pull/25706#issuecomment-1453848508

   The read method here uses the [`EXPORT`](https://github.com/apache/beam/blob/39cab94361bc44e8b48257385d37d8978ab7fc02/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java#L864) read method. There's a a `DIRECT` read schematransform here ([BigQueryDirectReadSchemaTransformProvider](https://github.com/apache/beam/blob/master/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/BigQueryDirectReadSchemaTransformProvider.java)), maybe this should also have a more precise name and include "Export"?
   
   Similarly with the write schematransform, it uses the FILE_LOADS method. In comparison, there is the `STORAGE_WRITE_API` schematransform here ([BigQueryStorageWriteApiSchemaTransformProvider](https://github.com/apache/beam/blob/master/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/BigQueryStorageWriteApiSchemaTransformProvider.java))
   
   P.S. I know this makes the names super long, so I'm open to a better way of doing this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org