Importing data to Cloud SQL

Cloud SQL supports importing and exporting data via a managed interface, available in both the Cloud Console and the gcloud CLI. Data can be imported and exported as either SQL dump files or CSV files, for both MySQL and PostgreSQL instances. Additionally, there are some restrictions on how data files must be formatted.

For MySQL dump files, there can be no views, triggers, or stored procedures. CSV files must match the same format used in LOAD DATA INFILE commands. PostgreSQL instances currently do not support CSV imports.

Some other forms of importing and exporting data are not fully supported, due to how Cloud SQL implements security, specifically around user FILE permissions. See https://cloud.google.com/sql/docs/features#differences ...

Get Building Google Cloud Platform Solutions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.