How to avoid appending the data in the looker while sending file to s3.

  • 20 April 2021
  • 1 reply

Looker is pushing my file to s3 bucket. I want to avoid looker to append the timestamp at the end of the file and send the name of the file as I want to. How can I do that. I don’t want to write an extra bash script to do this. 



This topic has been closed for comments

1 reply

Userlevel 4

You would need a script, unfortunately. The decision to append the timestamp to the filename is intentional, and was added many moons ago to support folks who don’t want files for repeat deliveries to be overwritten in their S3 buckets (which I believe is default behavior for S3). The general idea would be to (1) call `run_look`, (2) grab the file returned from the API and add whatever desired filename you want to give it, finally (3) push that to your bucket using your mechanism of choice (the `boto` python library leverages the AWS SDK and could make this easier )