split from vairable and compare the data in Streamsets transformer

asked 2020-03-30 08:59:36 -0500

Kalaivani gravatar image

Hi Team,

I'm trying to filter out only digits from the filename - Customer_RP1_01042018_112649_31129999_235959.dat. Based on the data received, I'm extracting the data from current filename which has the same file pattern and compare it against digits. Filename - Customer_RP1_01042018_112649_31129999_235959.dat is in the format - <staticname>_<date ddmmyyyy="">_<timestamp hhmmss="">_<date ddmmyyyy="">_<timestamp hhmmss="">.

I have to get the date from the existing filename and compare it with the current filename and assign filename to a variable.

I'm trying data1=split(filename,'_')[4], data2=split(new_filename,'_')[4]. if ( data1>data2,data1) but getting an error in the filter component.

Regards, Kalaivani

edit retag flag offensive close merge delete