Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

Extract Partial File Name

Highlighted
8 - Asteroid

Can Alteryx extract part of a file name and append it as a new column? I am trying to mass load 800 files, but need to extract the date that is part of each file name. To complicate matters, not all date formats are the same. Ideally I would like to ask Alteryx to grab everything that is right off the letters PPV (see screenshot):

 

ppv.png

 

 

 

Highlighted
Alteryx Certified Partner

@kheuer,

 

Sounds like a use case for RegEx. The following expression will extract the string of characters after PPV and before .xlsx. As for converting them to DATE fields, you can try using this BB Date macro available in Gallery.

^.+PPV\s(.+).xlsx$

image.png

Highlighted
8 - Asteroid

@jrgo - you are a life saver! Thank you. I am super close to getting this incorporated into my workflow.  I think the expression you provided needs to be modified, but I can't figure out the syntax. Can you please assist?

 

File Path.png

Highlighted
Alteryx Certified Partner

@kheuer

 

Yeah, that expression will not work if you're bringing in the entire file path. Try this instead...

^.+PPV\s(.+).xlsx\|.+$
Highlighted
8 - Asteroid

THANK YOU!!!! I am so incredibly thankful.

Highlighted
7 - Meteor

Hi,

 

Can you help me to PARSE my FileName column- 

\\ABC-WIN-NAS-P21.ABC.com\GOT_FS\Log_Cost\Contingency\Outputs\COGNOS\COGNOS_Unit_DC.csv

 

I need only COGNOS_Unit_DC from the Filename column

Highlighted
Alteryx Certified Partner
FileGetFileName([filepath]])

This function will pull out the file name, excluding the extension.

Highlighted
8 - Asteroid

This is the most elegant way to retrieve the file name

Labels