title: Cloud SQL: export data to CSV periodically avoiding duplicates
body: <p>I want to export the data from Cloud SQL (postgres) to a CSV file periodically (once a day for example) and each time the DB rows are exported it must not be exported in the next export task.</p>
  
  <p>I'm currently using a POST request to perform the export task using cloud scheduler. The problem here (or at least until I know) is that it won't be able to export and delete (or update the rows to mark them as exported) in a single http export request.</p>
  
  <p>Is there any possibility to delete (or update) the rows which have been exported automatically with any Cloud SQL parameter in the http export request?</p>
  
  <p>If not, I assume it should be done it a cloud function triggered by a pub/sub (using scheduler to send data once a day to pub/sub) but, is there any optimal way to take all the ID of the rows retrieved from the select statment (which will be use in the <a href="https://cloud.google.com/sql/docs/mysql/import-export/exporting#csv" rel="nofollow noreferrer">export</a>) to delete (or update) them later?</p>