I'm trying to populate a mysql db with a csv that i have in cloud storage
I'm using the API Explorer to execute the request with the following request body:
{
"importContext": {
"csvImportOptions": {
"columns": [
"col1",
"col2",
"col3"
],
"table": "table_name"
},
"database": "db_name",
"fileType": "CSV",
"kind": "sql#importContext",
"uri": "gs://some_bucket/somecsv.csv"
}
}
When i hit the execute button i receive a 200 response with the following body
{
"kind": "sql#operation",
"selfLink": "https://www.googleapis.com/sql/v1beta4/projects/somelink",
"targetProject": "some-project",
"targetId": "some-tarjet",
"targetLink": "https://www.googleapis.com/sql/v1beta4/projects/somelink",
"name": "some-name",
"operationType": "IMPORT",
"status": "PENDING",
"user": "myuser@mydomain.com",
"insertTime": "somedate",
"importContext": {
...
}
}
But if i go to the detail instance page in the google console i see this message:
gs://link-to-csv: Access denied for account oosyrcl32gnzypxg4uhqw54uab@somename.iam.gserviceaccount.com (permission issue?)
I'm authenticated with the same account that created the bucket in cloud storage where the csv is and this also happens using the python sdk.