I am very new to GCS and Cloud SQL, so forgive me if I am not asking this question well.

A colleague and I have been working on a machine learning workflow that generates polygons from some predictions made by our model. Now, we need to store information about these polygons in a Postgres database (hosted in Cloud SQL) to be able to query information over several years of data. The issue I'm currently faced with is actually connecting to the database. Preferably, I'd like to connect to it in the Colab environment (all of our code up to this point in the workflow has been written/run in Colab) so that I can seamlessly upload the polygon information to the db using Python. Up to this point, however, I have hit a wall with every solution I've attempted.

Is there a straightforward way that I can connect to my Cloud SQL db in the Colab environment? If not, what are some alternative approaches that I might not be thinking of at the moment (preferably using Python)?

  • Welcome to GIS SE. As a new user, please take the Tour, which emphaiszes the importance of asking One question per Question. Questions with multiple bulleted questions risk quick closure. – Vince Jul 7 '20 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.