Thursday, May 16, 2019

Re: [google-cloud-sql-discuss] Re: Truncate Cloud SQL table using Cloud Admin API

The SQL Admin API would be to manage instances. Like creating a new instance, editing machine type, etc.

To work with the actual objects in the database you need to execute SQL statements. A pattern for what you want to do would be to:

1. Create a connection object in the language of your choice. 
2. Read the CSV into a data structure.
3. execute truncate SQL statement.
4. execute insert statement. 



On Thu, May 9, 2019 at 6:42 AM Rajesh Sandadi <rajesh.sandadi@emirates.com> wrote:
Can someone please tell me how I can do this?

On Monday, May 6, 2019 at 3:39:29 PM UTC+4, Rajesh Sandadi wrote:
Hi Team,

My requirement is to truncate the cloud sql table prior to import CSV data.

Is there any option achieve the same using cloud sql admin API?

Thanks,  

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/605deec5-d792-4096-9c01-3232fc810af8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
John Scott  Ertel, CMA, CPA.
504-250-3350

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/CAOTThPn8JnBe8BM2kUEU-%3DOj902y1rDu1jHCRJnLr-ds7zEQkg%40mail.gmail.com.

No comments:

Post a Comment