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

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

                Author: ASF GitHub Bot
            Created on: 27/Mar/20 01:16
            Start Date: 27/Mar/20 01:16
    Worklog Time Spent: 10m 
      Work Description: TheNeuralBit commented on pull request #10055: 
[BEAM-8603] Add Python SqlTransform
URL: https://github.com/apache/beam/pull/10055#discussion_r398982127
 
 

 ##########
 File path: sdks/python/apache_beam/transforms/sql_test.py
 ##########
 @@ -0,0 +1,109 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Tests for transforms that use the SQL Expansion service."""
+
+# pytype: skip-file
+
+from __future__ import absolute_import
+
+import logging
+import typing
+import unittest
+
+from nose.plugins.attrib import attr
+from past.builtins import unicode
+
+import apache_beam as beam
+from apache_beam import coders
+from apache_beam.options.pipeline_options import DebugOptions
+from apache_beam.options.pipeline_options import StandardOptions
+from apache_beam.testing.test_pipeline import TestPipeline
+from apache_beam.testing.util import assert_that
+from apache_beam.testing.util import equal_to
+from apache_beam.transforms.sql import SqlTransform
+from apache_beam.utils import subprocess_server
+
+SimpleRow = typing.NamedTuple(
+    "SimpleRow", [("int", int), ("str", unicode), ("flt", float)])
+coders.registry.register_coder(SimpleRow, coders.RowCoder)
+
+
+@attr('UsesSqlExpansionService')
+@unittest.skipIf(
+    TestPipeline().get_pipeline_options().view_as(StandardOptions).runner is
+    None,
+    "Must be run with a runner that supports cross-language transforms")
 
 Review comment:
   Ah actually I also ran into an issue when running this test with the default 
runner, that I'm having a hard time making sense of:
   
   ```
   E       ValueError: Missing requirement declaration: 
{'beam:requirement:pardo:splittable_dofn:v1'}                     
                                                                                
                                          
   sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py:651: 
ValueError
   ```
   
   It looks like it's indicating my pipeline should contain a `splittable_dofn` 
declaration but doesn't - but I'm not clear on why it needs that declaration (I 
don't think anything in the pipeline needs to be splittable), or how to add it.
 
----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 410752)
    Time Spent: 5h  (was: 4h 50m)

> Add Python SqlTransform MVP
> ---------------------------
>
>                 Key: BEAM-8603
>                 URL: https://issues.apache.org/jira/browse/BEAM-8603
>             Project: Beam
>          Issue Type: Improvement
>          Components: dsl-sql, sdk-py-core
>            Reporter: Brian Hulette
>            Assignee: Brian Hulette
>            Priority: Major
>          Time Spent: 5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to