TheNeuralBit commented on a change in pull request #10055: [BEAM-8603] Add 
Python SqlTransform
URL: https://github.com/apache/beam/pull/10055#discussion_r403515182
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/SqlTransform.java
 ##########
 @@ -296,4 +313,24 @@ static UdafDefinition of(String udafName, 
Combine.CombineFn combineFn) {
       return new AutoValue_SqlTransform_UdafDefinition(udafName, combineFn);
     }
   }
+
+  @AutoService(ExternalTransformRegistrar.class)
+  public static class External implements ExternalTransformRegistrar {
+
+    private static final String URN = "beam:external:java:sql:v1";
+
+    @Override
+    public Map<String, Class<? extends ExternalTransformBuilder>> 
knownBuilders() {
+      return 
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap.of(
+          URN, AutoValue_SqlTransform.Builder.class);
+    }
+
+    public static class Configuration {
+      String query;
 
 Review comment:
   This is currently configured with a pipeline option: 
https://github.com/apache/beam/blob/1e52e4298085eda8e88e1215c7a73d52658b31f1/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/BeamSqlPipelineOptions.java#L27-L29
   
   I think it would be appropriate to do the same for Python. Filed BEAM-9699 
to track 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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to