Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I would like to know if there is a way to get file properties (like size, timestamp) of a file places in S3 bucket.
I have tried the following but unable to get file size and timestamps. Also does this differ if the file in S3 bucket is .gz file.
tS3 Connection
tS3FileList --iterate--> tFIleProperties --iterate--> tIterateToFlow --main--> tLogRow
Thanks,
A
Additionally, all of the suggestions of "download the file and check the timestamp" are no use since the tS3Get component gives the file a timestamp of the time the download was done, it does not replicate the S3 timestamp of the file onto the local file.
SOLVED!
If your tS3List component is called, for example, tS3List_1, simply add the following entry to a Date column in the subsequent tIterateToFlow:
objectSummary_tS3List_1.getLastModified()
This is relying on undocumented internal variables. I have tested it in Talend v6.3 and 7.1. Another drawback is that if you copy and paste a pair of components, the globalMap.get("tS3List_1_CURRENT_KEY") call will be updated with the new component name, but the internal variable objectSummary_tS3List_1 will not be.