Skip to content
Advertisement

S3 appending random string in file name

I have a s3 folder with a csv file stored on it. I’m trying to download the last modified file. I’m using this script to get the last modified file:

JavaScript

This code lists my last modified object, the file name is part-00000-40f267f2-38dc-4bab-811c-4c3052fdb1ba-c000.csv and is inside the file_r folder.

Although, when I use s3_client.download_file i get the following error:

JavaScript

When i print my path and my file I get the correct values

JavaScript

Why the value .8cEebaeb is appended after the .csv extension since the PATH is correct.

Any thoughs on that?

Advertisement

Answer

To solve the problem I changed the code to:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement