Search code examples
google-cloud-platformgoogle-cloud-storagespring-batchspring-cloud-gcp

Writing CSV file from Spring batch to GCP Storage


I want to write the csv file in GCP Storage using Spring batch, I can see we can upload the file after CSV file is created through Batch,

But is there any way we can directly write the file into the GCP Storage from Spring Batch


Solution

  • This is similar to the question about writing directly to Amazon S3: spring batch file writer to write directly to amazon s3 storage without PutObjectRequest

    You can try to use Spring Cloud GCP and write a custom writer as shown in this example: https://stackoverflow.com/a/54947585/5019386