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

[GitHub] [beam] andreigurau opened a new pull request, #26384: Add field annotations for high-priority Syndeo schema transforms

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

   Add field annotations for BigQuery Storage Read, File Write, Spanner Changestreams Read, and Spanner Write schema transforms. This is necessary for tying a description to each field, so that when a schema transform config is generated, each field would have a description of what it is supposed to do
   
   ------------------------
   
   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](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] andreigurau commented on a diff in pull request #26384: Add field annotations for high-priority Syndeo schema transforms

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


##########
sdks/java/io/file-schema-transform/src/main/java/org/apache/beam/sdk/io/fileschematransform/FileWriteSchemaTransformConfiguration.java:
##########
@@ -51,43 +52,41 @@ public static XmlConfiguration.Builder xmlConfigurationBuilder() {
         .setCharset(StandardCharsets.UTF_8.name());
   }
 
-  /**
-   * The format of the file content. Used as String key lookup of {@link
-   * FileWriteSchemaTransformFormatProviders#loadProviders()}.
-   */
+  @SchemaFieldDescription(
+      "The format of the file content. Value must be one of: \"avro\", \"csv\", \"json\", \"parquet\", \"xml\"")
   public abstract String getFormat();
 
-  /** A common prefix to use for all generated filenames. */
+  @SchemaFieldDescription("A common prefix to use for all generated filenames.")
   public abstract String getFilenamePrefix();
 
-  /**
-   * The compression of all generated shard files. By default, appends the respective extension to
-   * the filename. See {@link org.apache.beam.sdk.io.Compression} for expected values.
-   */
+  /** See {@link org.apache.beam.sdk.io.Compression} for expected values. */
+  @SchemaFieldDescription(
+      "The compression of all generated shard files. By default, appends the respective extension to the filename.")

Review Comment:
   done



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/BigQueryDirectReadSchemaTransformProvider.java:
##########
@@ -123,15 +124,22 @@ public static Builder builder() {
           .Builder();
     }
 
+    @SchemaFieldDescription("The SQL query to be executed to read from the BigQuery table.")
     @Nullable
     public abstract String getQuery();
 
+    @SchemaFieldDescription(
+        "The BigQuery table to read from. Format: [${PROJECT}:]${DATASET}.${TABLE}")

Review Comment:
   done



-- 
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 #26384: Add field annotations for high-priority Syndeo schema transforms

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


-- 
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 #26384: Add field annotations for high-priority Syndeo schema transforms

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

   `org.apache.beam.sdk.io.gcp.datastore.RampupThrottlingFnTest.testRampupThrottler` unrelated flake


-- 
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] andreigurau commented on a diff in pull request #26384: Add field annotations for high-priority Syndeo schema transforms

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


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/BigQueryDirectReadSchemaTransformProvider.java:
##########
@@ -123,15 +124,22 @@ public static Builder builder() {
           .Builder();
     }
 
+    @SchemaFieldDescription("The SQL query to be executed to read from the BigQuery table.")
     @Nullable
     public abstract String getQuery();
 
+    @SchemaFieldDescription(
+        "The BigQuery table to read from. Format: [${PROJECT}:]${DATASET}.${TABLE}")
     @Nullable
     public abstract String getTableSpec();
 
+    @SchemaFieldDescription(
+        "The Google standard SQL expression to read only the rows matched from the specified filter. If no value is specified, then all rows are returned.")
     @Nullable
     public abstract String getRowRestriction();
 
+    @SchemaFieldDescription(
+        "Read only the specified fields (columns) from a BigQuery table. Fields may not be returned in the order specified. If no value is specified, then all fields are returned.")
     @Nullable
     public abstract List<String> getSelectedFields();

Review Comment:
   done (seems like it's using commas to separate each entry within a list)



-- 
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 #26384: Add field annotations for high-priority Syndeo schema transforms

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

   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 a diff in pull request #26384: Add field annotations for high-priority Syndeo schema transforms

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


##########
sdks/java/io/file-schema-transform/src/main/java/org/apache/beam/sdk/io/fileschematransform/FileWriteSchemaTransformConfiguration.java:
##########
@@ -51,43 +52,41 @@ public static XmlConfiguration.Builder xmlConfigurationBuilder() {
         .setCharset(StandardCharsets.UTF_8.name());
   }
 
-  /**
-   * The format of the file content. Used as String key lookup of {@link
-   * FileWriteSchemaTransformFormatProviders#loadProviders()}.
-   */
+  @SchemaFieldDescription(
+      "The format of the file content. Value must be one of: \"avro\", \"csv\", \"json\", \"parquet\", \"xml\"")
   public abstract String getFormat();
 
-  /** A common prefix to use for all generated filenames. */
+  @SchemaFieldDescription("A common prefix to use for all generated filenames.")
   public abstract String getFilenamePrefix();
 
-  /**
-   * The compression of all generated shard files. By default, appends the respective extension to
-   * the filename. See {@link org.apache.beam.sdk.io.Compression} for expected values.
-   */
+  /** See {@link org.apache.beam.sdk.io.Compression} for expected values. */
+  @SchemaFieldDescription(
+      "The compression of all generated shard files. By default, appends the respective extension to the filename.")

Review Comment:
   Can you add a link to https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/io/Compression.html for expected inputs?



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/BigQueryDirectReadSchemaTransformProvider.java:
##########
@@ -123,15 +124,22 @@ public static Builder builder() {
           .Builder();
     }
 
+    @SchemaFieldDescription("The SQL query to be executed to read from the BigQuery table.")
     @Nullable
     public abstract String getQuery();
 
+    @SchemaFieldDescription(
+        "The BigQuery table to read from. Format: [${PROJECT}:]${DATASET}.${TABLE}")
     @Nullable
     public abstract String getTableSpec();
 
+    @SchemaFieldDescription(
+        "The Google standard SQL expression to read only the rows matched from the specified filter. If no value is specified, then all rows are returned.")
     @Nullable
     public abstract String getRowRestriction();
 
+    @SchemaFieldDescription(
+        "Read only the specified fields (columns) from a BigQuery table. Fields may not be returned in the order specified. If no value is specified, then all fields are returned.")
     @Nullable
     public abstract List<String> getSelectedFields();

Review Comment:
   How does Syndeo allow users to input a list? should that be mentioned in the description?



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/BigQueryDirectReadSchemaTransformProvider.java:
##########
@@ -123,15 +124,22 @@ public static Builder builder() {
           .Builder();
     }
 
+    @SchemaFieldDescription("The SQL query to be executed to read from the BigQuery table.")
     @Nullable
     public abstract String getQuery();
 
+    @SchemaFieldDescription(
+        "The BigQuery table to read from. Format: [${PROJECT}:]${DATASET}.${TABLE}")

Review Comment:
   ```suggestion
           "The fully-qualified name of the BigQuery table to read from. Format: [${PROJECT}:]${DATASET}.${TABLE}")
   ```



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/BigQueryDirectReadSchemaTransformProvider.java:
##########
@@ -123,15 +124,22 @@ public static Builder builder() {
           .Builder();
     }
 
+    @SchemaFieldDescription("The SQL query to be executed to read from the BigQuery table.")
     @Nullable
     public abstract String getQuery();
 
+    @SchemaFieldDescription(
+        "The BigQuery table to read from. Format: [${PROJECT}:]${DATASET}.${TABLE}")
     @Nullable
     public abstract String getTableSpec();
 
+    @SchemaFieldDescription(
+        "The Google standard SQL expression to read only the rows matched from the specified filter. If no value is specified, then all rows are returned.")

Review Comment:
   ```suggestion
           "Read only rows that match this filter, which must be compatible with Google standard SQL. This is not supported when reading via query.")
   ```



-- 
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] andreigurau commented on a diff in pull request #26384: Add field annotations for high-priority Syndeo schema transforms

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


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/BigQueryDirectReadSchemaTransformProvider.java:
##########
@@ -123,15 +124,22 @@ public static Builder builder() {
           .Builder();
     }
 
+    @SchemaFieldDescription("The SQL query to be executed to read from the BigQuery table.")
     @Nullable
     public abstract String getQuery();
 
+    @SchemaFieldDescription(
+        "The BigQuery table to read from. Format: [${PROJECT}:]${DATASET}.${TABLE}")
     @Nullable
     public abstract String getTableSpec();
 
+    @SchemaFieldDescription(
+        "The Google standard SQL expression to read only the rows matched from the specified filter. If no value is specified, then all rows are returned.")

Review Comment:
   done



-- 
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