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

1

6

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.

Dispensatory answered 7/4, 2016 at 14:39 Comment(4)
Is there an update for 2018?Blackout
and for 2019? I am trapped in this situationMetre
2024 and the problem still persistMedlock
Any luck AryJazz, Gonzola, @Medlock ?Schoonmaker
V
3

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.

Visby answered 7/4, 2016 at 19:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.