Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When importing a CSV from Google Storage into Google SQL is there a way to skip the first row?

From https://console.cloud.google.com/sql/instances/ select an instance, then select "Import", then select "CSV".

I don't see any option to skip the first row.

The LOAD statement can do it, I just don't see that option in the Web UI.

like image 328
Emery Lapinski Avatar asked Oct 19 '22 12:10

Emery Lapinski


1 Answers

No, that's not something we currently support in the Cloud Console or the API.

For the time being, you can use LOAD DATA LOCAL INFILE to execute a load from a different machine but that won't be as efficient. Does that work for you?

Alternatively, you could manually remove the header from the file. I realize that's less ideal than having the import automatically ignore it.

like image 105
Vadim Avatar answered Jan 04 '23 07:01

Vadim