Ask Your Question

Extracting field and timestamp value from SFTP filename

asked 2019-11-06 12:28:09 -0600

cvjere gravatar image

updated 2019-11-06 12:35:32 -0600

metadaddy gravatar image

Hi, I have SFTP FTP client which is picking up files . The file format is abc_fieldname_timestamp.csv say abc_A1_2019_04_14_02_30_45.csv.

I want to pick up values of fieldname (A1) and timestamp (2019_04_14_02_30_45 from this file and pass on them as records .

Any guidance on how to can i accomplish this is highly appreciated

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-11-06 12:35:08 -0600

metadaddy gravatar image

Do a preview with field/record headers enabled and you will see that the filename is present in the filename attribute. You can use the Expression Evaluator with str:regExCapture() and record:attribute() to extract the substrings you need and set them as fields in the record.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-11-06 12:28:09 -0600

Seen: 76 times

Last updated: Nov 06 '19