Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I had a requirement where I need to load 10 CSV files located on a folder to one CSV file and I was able to achieve that.
Now the other thing I was asked today was to create a LOAD_DATE column in the output CSV file and the LOAD_DATE should be based on the date which is a part of the name of the source CSV files.
For Instance name of one of the source csv files is All_VM_Cluster_Stats_2018-11-04.
When the data from this file is loaded to the target output csv file, LOAD_DATE column should be populated with '2018-11-04'
Please explain how to achieve this.
Thank You.
if filename pattern as describe, it very easy, just use in tMap:
as "filename" - use You current filename (for example from tFileList)
StringHandling.RIGHT(((String)globalMap.get("tFileList_1_CURRENT_FILE")).replaceAll(".csv",""),10)
if filename pattern as describe, it very easy, just use in tMap:
as "filename" - use You current filename (for example from tFileList)
StringHandling.RIGHT(((String)globalMap.get("tFileList_1_CURRENT_FILE")).replaceAll(".csv",""),10)