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

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

                Author: ASF GitHub Bot
            Created on: 01/Jul/20 03:47
            Start Date: 01/Jul/20 03:47
    Worklog Time Spent: 10m 
      Work Description: piotr-szuberski commented on a change in pull request 
#12023:
URL: https://github.com/apache/beam/pull/12023#discussion_r448099062



##########
File path: sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.py
##########
@@ -0,0 +1,138 @@
+#
+# 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.
+#
+
+# pytype: skip-file
+
+from __future__ import absolute_import
+
+import logging
+import typing
+import unittest
+
+from past.builtins import unicode
+
+import apache_beam as beam
+from apache_beam import coders
+from apache_beam.io.external.jdbc import WriteToJdbc
+from apache_beam.testing.test_pipeline import TestPipeline
+
+# pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports
+try:
+  import sqlalchemy
+except ImportError:
+  sqlalchemy = None
+# pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports
+
+# pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports
+try:
+  from testcontainers.postgres import PostgresContainer
+except ImportError:
+  PostgresContainer = None
+# pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports
+
+JdbcTestRow = typing.NamedTuple(
+    "JdbcTestRow",
+    [
+        ("f_id", int),
+        ("f_real", float),
+        ("f_string", unicode),
+    ],
+)
+
+coders.registry.register_coder(JdbcTestRow, coders.RowCoder)
+
+
[email protected](sqlalchemy is None, "sql alchemy package is not installed.")
[email protected](
+    PostgresContainer is None, "testcontainers package is not installed")

Review comment:
       I left those skipIfs and added testcontainers only for python3 
```testcontainers<3.0.3; python_version >= "3.5"'```

##########
File path: sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.py
##########
@@ -0,0 +1,138 @@
+#
+# 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.
+#
+
+# pytype: skip-file
+
+from __future__ import absolute_import
+
+import logging
+import typing
+import unittest
+
+from past.builtins import unicode
+
+import apache_beam as beam
+from apache_beam import coders
+from apache_beam.io.external.jdbc import WriteToJdbc
+from apache_beam.testing.test_pipeline import TestPipeline
+
+# pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports
+try:
+  import sqlalchemy
+except ImportError:
+  sqlalchemy = None
+# pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports
+
+# pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports
+try:
+  from testcontainers.postgres import PostgresContainer
+except ImportError:
+  PostgresContainer = None
+# pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports
+
+JdbcTestRow = typing.NamedTuple(
+    "JdbcTestRow",
+    [
+        ("f_id", int),
+        ("f_real", float),
+        ("f_string", unicode),
+    ],
+)
+
+coders.registry.register_coder(JdbcTestRow, coders.RowCoder)
+
+
[email protected](sqlalchemy is None, "sql alchemy package is not installed.")
[email protected](
+    PostgresContainer is None, "testcontainers package is not installed")

Review comment:
       I left those skipIfs as they were and added testcontainers only for 
python3 ```testcontainers<3.0.3; python_version >= "3.5"'```




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


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

    Worklog Id:     (was: 453213)
    Time Spent: 10h 10m  (was: 10h)

> Add cross-language wrapper for Java's JdbcIO Read
> -------------------------------------------------
>
>                 Key: BEAM-10135
>                 URL: https://issues.apache.org/jira/browse/BEAM-10135
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>    Affects Versions: Not applicable
>            Reporter: Piotr Szuberski
>            Assignee: Piotr Szuberski
>            Priority: P2
>              Labels: portability
>             Fix For: Not applicable
>
>          Time Spent: 10h 10m
>  Remaining Estimate: 0h
>
> Add cross-language wrapper for Java's Jdbc Read



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

Reply via email to