Reputation: 7074
I am trying to create a connection to a Cloud SQL database in another GCP project in Big Query. It will not allow me. I am getting the message:
CloudSQL instances must be in the same project as the query connection.
How do I get around this? Is my only option to copy the data from one project to another?
Upvotes: 5
Views: 1791
Reputation: 76063
There is a bad workaround. Create a view with the request to your Cloud SQL database in the same project as your Cloud SQL instance, and query this view from another project.
The problem (and why it's a bad workaround) is that you can't customize the Cloud SQL query. In fact, you should create a view for each table, and then create your query with all the views to achieve your joins and other SQL manipulation that you want.
Upvotes: 4