Help

Exporting a view to s3 via scripting block

Topic Labels: ImportingExporting
2687 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Jeremy_Clark
4 - Data Explorer
4 - Data Explorer

I am looking to export a view directly to s3 and I was wondering if there was a way to do this with a scripting block? If not is there any good 3rd party that will help do this?

3 Replies 3

Hi Jeremy, and welcome to the community!

Yes.

I have successfully integrated exports of data based on views to many systems including S3 object stores. But there are a few more questions that should be addressed…

  • Are you thinking a JSON data object as the format to be stored in S3, or something else?
  • Does this need to happen automatically, or are you comfortable with manually invoking this “backup” to S3?

We were thinking CSV but are open to other data structures if that makes it easier. Automatically would be ideal but if that doesn’t work we are comfortable with invoking it manually.

Yep - that’s possible and straightforward to achieve:

  1. Create a script block that reads the table
  2. Converts it into a CSV (script block example here)
  3. Authenticates with and calls the S3 API to upload the file