SELECT ... INTO OUTFILE

43 views
Skip to first unread message

Rajesh Golla

unread,
May 5, 2021, 9:11:43 AM5/5/21
to Google Cloud SQL discuss
I want push csv file from cloudsql to cloud storage using below command

select * INTO OUTFILE 'cloud_bucket_path/test.csv'         FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'         LINES TERMINATED BY '\n' from table_name limit 10

But I am getting below error:

Error Code: 1227. Access denied; you need (at least one of) the FILE privilege(s) for this operation

I want to know whether we can use this approach to generate and place a csv file from Cloud SQL to Cloud Storage.

Appreciate your help.



David (Cloud Platform Support)

unread,
May 5, 2021, 4:38:53 PM5/5/21
to Google Cloud SQL discuss

Hello,

Have you tried doing it from the Cloud Console? You can follow these instructions

Rajesh Golla

unread,
May 6, 2021, 3:10:20 AM5/6/21
to Google Cloud SQL discuss
Hi David,

I want to execute that select statement in procedure but anyways I got a approach using cloud function.

Thanks for the help.
Reply all
Reply to author
Forward
0 new messages