ilango100 commented on a change in pull request #17017:
URL: https://github.com/apache/beam/pull/17017#discussion_r821403835



##########
File path: sdks/python/apache_beam/io/jdbc.py
##########
@@ -120,8 +120,8 @@ def default_io_expansion_service(classpath=None):
         ('password', str),
         ('connection_properties', typing.Optional[str]),
         ('connection_init_sqls', typing.Optional[typing.List[str]]),
-        ('write_statement', typing.Optional[str]),
         ('read_query', typing.Optional[str]),
+        ('write_statement', typing.Optional[str]),

Review comment:
       I tried using the `query` param of ReadFromJdbc, which I found out was 
ignored all the time. Then I tried to debug what was received on java side as 
configuration and found that query is set as `writeStatement` rather than 
`readQuery`. I saw that the order in which it's defined in python is different 
than that's [defined in 
java](https://github.com/apache/beam/blob/master/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcSchemaIOProvider.java#L67).
 I tried to change the order and then the query parameter started working.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to