0
votes

I am trying a simple operation where I import a csv file from my cloud storage bucket into my cloud sql database. However I repeatedly receive the error message HTTPError 400: Unknown export file type..

I am following https://cloud.google.com/sdk/gcloud/reference/sql/import/csv as reference.

What can be wrong?

enter image description here

The database Prod exists as does the fundamental table

enter image description here

The actual .csv data I am trying to import

enter image description here

1
are you certain: gs://pmb-storage/fundamental/CH0012221716.csv returns your database?Sweet Chilly Philly
I am trying to append the values inside the csv file into the database...uncool

1 Answers

1
votes

CSV is currently not a supported file type in Cloud SQL, SQL Server. As stated in this documentation,

In Cloud SQL, SQL Server currently supports importing databases using SQL and BAK files.

You can do one of the following:

  1. Switch database engine to either MySQL or PostgreSQL where CSV files are supported.
  2. If the data on your CSV file came from an on-premise SQL Server database table, you can create an SQL file from it, then use it to import into Cloud SQL, SQL Server.