case-k-git opened a new issue, #23029:
URL: https://github.com/apache/beam/issues/23029

   ### What happened?
   
   When I tried to deploy python jdbc pipeline to dataflow from my local env, 
failed to deploy into dataflow and got  connection error. seems to be python 
jdbc io trying to connect database from local env not only dataflow env. 
   
   
    I have checked connection and find trying to make connection from my 
pc.database can only accepting connection inside from dataflow  net work so got 
connection error.
   
   I have also checked java jdbc version and it worked fine. so python versions 
this behavior must be bug  
   ```
   class PostgresToBigQueryDataflow():
   
       def __init__(self):
           self._username = '<username>'
           self._password = '<password>'
           self._driver_class_name = 'org.postgresql.Driver'
           self._query = "select id from beam_table;"
           self._jdbc_url = 'jdbc:postgresql://<private_IP>:5432/beam'
           self._project = '<project id>'
           self._dataset = '<dataset>'
           self._table = '<table>'
           self._options = DebugOptions([
               "--runner=DataflowRunner",
               "--project=<project id>",
               "--job_name=<job name>",
               "--temp_location=gs://<project id>/tmp/",
               "--region=us-central1",
               "--experiments=use_runner_v2",
               "--subnetwork=regions/us-central1/subnetworks/<subnet>",
           ])
       def test(self):
           JdbcToBigQuery(self._username, self._password, 
self._driver_class_name, self._query, self._jdbc_url, self._project, 
self._dataset,self._table, self._options).run()
   ```
   
   
![connection](https://user-images.githubusercontent.com/40357957/188305305-0fd03f42-8a09-48b7-89d2-07932b554023.png)
   
   https://www.case-k.jp/entry/2022/02/14/124711
   
   
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: cross-language


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