0

I have the CSV file in GSBucket, and created the empty table in CloudSQL , and now I want to load data from GsBucket CSV to CloudSQL SQL Server table (existing), if I am using below command on CloudShell:

gcloud sql import csv testinstance gs://testbucketsabir/covid_clean.csv --database=TestDb --table=covid_clean --quiet 

I get this error:

ERROR: (gcloud.sql.import.csv) HTTPError 400: Unknown export file type

Please help a beginner - I want to know where the problem is and what is going wrong here.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

1

According to the documentation, CSV is not currently supported in Cloud SQL and SQL Server :

Note: In Cloud SQL, the current SQL Server support for imports and exports consists of the following: Importing databases using BAK and SQL files. Exporting databases using BAK files.

Importing CSV is supported in Cloud SQL with MySQL or PostgresSQL databses.

If it's mandatory in you case to keep SQL Server database, you have to use BAK or SQL files : export to SQL files, then import it to Cloud SQL/SQL Server.

Mazlum Tosun
  • 5,761
  • 1
  • 9
  • 23