Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Google Cloud Function To Add JSON To A Cloud SQL Database

Here’s a Google Cloud Function that takes some arbitrary json (in json_data) and posts it to a new record in a Cloud SQL database. No error handling or deduplication/matching, just a straight post:

https://github.com/krypted/tinyconverters/blob/548892cc377e1063770ab4a8cd53dc6573bae950/json_to_cloud_SQL.py

Before using, it needs information to connect to the database, so customize the INSTANCE_NAME, DATABASE_NAME, and TABLE_NAME for the INSERT. For more on Cloud SQL, see https://cloud.google.com/sql/docs.

The post Google Cloud Function To Add JSON To A Cloud SQL Database appeared first on krypted.



This post first appeared on Krypted.com | Tiny Deathstars Of Foulness, please read the originial post: here

Share the post

Google Cloud Function To Add JSON To A Cloud SQL Database

×

Subscribe to Krypted.com | Tiny Deathstars Of Foulness

Get updates delivered right to your inbox!

Thank you for your subscription

×