0
votes

I'm trying to create a connection from Data Fusion to Cloud SQL Postgres.

I'm stuck with connection error, and no idea how to solve it. Here's what I have done so far:

  • Datacloud API enabled Data Fusion instance is created with private IP cluster.
  • All permissions from Cloud SQL are granted to Data Fusion service accounts (SQL client, -manager, admin).
  • In the Cloud SQL instance, the private networking is enabled.

This error arises, when I try to create a connection to our Cloud SQL (Postgres) instance:

Failed to create connection to database via connection string: jdbc:postgresql://google/"omitted project Id"&socketFactory=com.google.cloud.sql.postgres.SocketFactory&useSSL=true:5432/"omitted tablename" and arguments: {user="omitted"}.

Error: GoogleJsonResponseException: 403 Forbidden { "code" : 403, "errors" : [ { "domain" : "global", "message" : "The client is not authorized to make this request.", "reason" : "notAuthorized" } ], "message" : "The client is not authorized to make this request." }.

Make sure you specify the correct connection properties.

Does data fusion service account have permission to read database/table? - vinisha
Thx for the question :) yes... the the problem is in the connection, not in the table reading... - ttorhcs
What does your full connection string look like? Are you specifying a cloudSqlInstance? See github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/…. - enocom