Question

After S3 Event need to capture file name in expression evaluator

  • 5 December 2022
  • 2 replies
  • 43 views

Hi All,

we are new in streamsets !!

In our usecase we are uploading file in s3 which predefined name as abcd_sggshs_31-04-2018.csv

we need to capture this above parameter which are in our file name,we are generating events after uploading file in s3,using expression evaluator we are trying to capture this parameter in json file in s3.

but we are not getting desired output.

below are the expression we are using please suggest the correct expression to get the file name.

 

 

 


2 replies

Hi,

Try ${record:id()}

 

 

Userlevel 4
Badge +1

@Priya151997 

 

can you please try this.

 

${str:split(record:value('/fileInfo/filename'),'_')}

If it didn’t help , please provide me the preview output of origin , so i can check the file naming format and based on that I will prepare the logic to get file name.

Reply