Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts,
I am facing issues to extract source file which is available in <FileName>_DateTime.txt format.
Requirement:
S3(AWS) will loaded with data for every 5 mints, it has 2 files one is Tinkling file which is nothing but file is available to extract other is data file. we need to compare the datatime format with Talend Datetime and start the job execution.Please suggest how to implement solution's using Talend(ver7.1)
Appreciate your support..
Thanks,
Praveen
Hi
Can you show us an example of file name and what data you need to compare and extract?
Regards
Shong
Hi,
My file name Conversion details:
ex : CUSTOMER_2020082841920.txt - this actual data file
TRANSFER_COMPLETED_2020082841920.txt - 0 kb file for handshake..
we need to compare hand shake file and pull data file for processing for ingestion..
Many thanks,
If you want need to extract the datatime from the file name, below are example code on tJava.
String filename = "TRANSFER_COMPLETED_2020082841920.txt";
String datetime=filename.substring(filename.lastIndexOf("_")+1, filename.indexOf("."));
System.out.println(datetime);
Context.datetime=datetime;
Then, if you need to build a new file name for comparison and extraction.
String newFileName="bababa"+context.datetime+".txt";