# Code sample to push data from solace to GCS bucket on GCP

**URL:** <https://community.solace.com/t/code-sample-to-push-data-from-solace-to-gcs-bucket-on-gcp/791>\
**Category:** Connectors & Integrations\
**Created:** [June 10, 2021, 2:11pm UTC](https://community.solace.com/t/code-sample-to-push-data-from-solace-to-gcs-bucket-on-gcp/791 "2021-06-10T14:11:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tims](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@tims](https://community.solace.com/u/tims)\
**Post date:** [June 10, 2021, 2:11pm UTC](https://community.solace.com/t/code-sample-to-push-data-from-solace-to-gcs-bucket-on-gcp/791/1 "2021-06-10T14:11:22Z")

</div>

Code sample to push data from solace to GCS bucket on GCP. Also does it support Outh 2.0 for authentication

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/solace/original/1X/1248f38eea018157e66cc024e8284f3331a54f94.png) [@system](https://community.solace.com/u/system)\
**Post date:** [June 10, 2021, 4:06pm UTC](https://community.solace.com/t/code-sample-to-push-data-from-solace-to-gcs-bucket-on-gcp/791/2 "2021-06-10T16:06:48Z")

</div>

Hi. In this file: [solace-apache-beam/solace-apache-beam-samples/src/main/java/com/solace/connector/beam/examples/WindowedWordCountSolace.java at master · SolaceProducts/solace-apache-beam · GitHub](https://github.com/SolaceProducts/solace-apache-beam/blob/master/solace-apache-beam-samples/src/main/java/com/solace/connector/beam/examples/WindowedWordCountSolace.java)

You can see the wordcount done on the collection, then results for an entire window pushed to a single file. I suspect you want to do something similar where you process a windows worth of data, in this case default is 10 seconds, and push to file. To push to GCS specify the GCP URI as the file path.
