Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Receiving 5 excel files as an input, but sometimes one of the excel file is missing?

Mohd-Siddiqui1
8 - Asteroid

Hi there,

 

I am receiving 5 excel files as an input, but sometimes one or more excel file is/are missing. I need to find out the filename of the missing excel file.

The dummy input file names are given below.

XYZ_ABCD1_filename.xls

XYZ_ABCD2_filename.xls

XYZ_ABCD3_filename.xls

XYZ_ABCD4_filename.xls

XYZ_ABCD5_filename.xls

 

Note: The XYZ_ABCD is same prefix for the all the input excel files. Remaining filename can be different.

 

Suppose if anyone of the above files are missing then i need to find out that particular filename.

For e.g. 1. if XYZ_ABCD1_filename.xls is missing out of 5 excel files then out put should be XYZ_ABCD1_filename.xls .

 

input :

XYZ_ABCD2_filename.xls

XYZ_ABCD3_filename.xls

XYZ_ABCD4_filename.xls

XYZ_ABCD5_filename.xls

 

output:

XYZ_ABCD1_filename.xls

 

 

2. input :

 

XYZ_ABCD1_filename.xls

XYZ_ABCD4_filename.xls

XYZ_ABCD5_filename.xls

 

 

output:

 

XYZ_ABCD2_filename.xls

XYZ_ABCD3_filename.xls

3 REPLIES 3
IraWatt
17 - Castor
17 - Castor

Hey @Mohd-Siddiqui1,

If you have a list of expected files you can use a join tool to indentify which are missing:

IraWatt_0-1656063046709.png

The right output of the join will contain the list of missing files. You can add the file names to your data here:

IraWatt_1-1656063094784.png

Any questions or issues please ask :)
HTH!
Ira

 

 

Mohd-Siddiqui1
8 - Asteroid

Hi @IraWatt 

 

Thank you for your quick response.

 

XYZ_ABCD1_filename(containing timestamp).xls So timestamp is also present in the filename. The only thing in the filename which is always expected and is consistent is the prefix part i.e. XYZ_ABCD1_, XYZ_ABCD2_, XYZ_ABCD3_, XYZ_ABCD4_, XYZ_ABCD5_

 

Can we use fuzzy logic tool for this? But i don't have knowledge on that tool.

 

 

 

 

IraWatt
17 - Castor
17 - Castor

Hey @Mohd-Siddiqui1,

You could use Fuzzy match but if your sure the first bit is consistent Regex is a better solution:

IraWatt_0-1656064765954.png

The Regex will parse the important bit we want to check then we can join that on our expected files list like before.

 

Labels