Question

I'm looking for the most efficient way to get results out of a Google Cloud SQL instance.

I know from the FAQ that the INTO OUTFILE command isn't supported, and the only official way of getting data out of Cloud SQL is by exporting your entire instance into a Cloud Storage bucket.

Should SQuirreL SQL be able to save the results of a query? They have a "Store results of SQL in file" script, but when I try that it gives me an "Invalid parameter for rows" error. I'm not sure if that is an issue with Squirrel or due to the Cloud SQL limitations.

Was it helpful?

Solution

You mentioned the "most efficient way" - do you need to do bulk export? In that case, exporting to a cloud storage bucket is the most efficient way.

If you just want to dump query result to file, assuming the number of rows is small, you can use the command line tool and pipe the result to a file (https://developers.google.com/cloud-sql/docs/commandline). SQuirreL SQL should be able to do the same thing. Not sure about that particular error you got.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top