Can't connect Cloud Data Fusion with Google Cloud SQL for PostgreSQL

前端 未结 2 1615
忘了有多久
忘了有多久 2021-01-19 09:31

My goal is to read data from Cloud SQL Postgres to BigQuery via a Cloud Data Fusion pipeline.

For this, I set up a Cloud Data Fusion instance and assigned the follow

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-19 09:47

    Most likely you need a driver and the JDBC Socket Factory to get it to work properly. You should bundle the postgres connector with the socket factory into a uber-jar and see if that solves the problem.

    Here is a quick (untested) pom that should accomplish this:

    
    
       4.0.0
       com.example
       postgres-with-cloud-sql-socket-factory
       pom
       0.0.1
    
       
          
             org.postgresql
             postgresql
             42.2.5
          
          
             com.google.cloud.sql
             postgres-socket-factory
             1.0.13
          
       
    
       
          
             
                org.apache.maven.plugins
                maven-assembly-plugin
                2.4.1
                
                   
                   
                      jar-with-dependencies
                   
                
                
                   
                      make-assembly
                      
                      package
                      
                         single
                      
                   
                
             
          
       
    
    

提交回复
热议问题