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.
SOLVED

Compare multiple files in two directories

Mikkel94
7 - Meteor

Hi all,

 

I need to compare files in two different directories. Both dictories contain 350 files. I have the following requirements:

  1. File A in directory 1 only needs to be compared with File A in directory 2 (files have only 1 tab)
  2. Files have 1402 rows and 30 columns which need to be compared
  3. I would like to import all files the same time.
  4. I would like to have one export contain all rows and cells that don't match + add a column with the name of the file in which the error occured for each row.

I'm new to this tool so this might be a noob question. I hope you can help me!

5 REPLIES 5
benakesh
12 - Quasar

Hi @Mikkel94 ,

You can include  a small number  of  sample files  in  dir1 and dir2  for  community  to develop  a  sample workflow .

I have added  process steps . 

  1. File A in directory 1 only needs to be compared with File A in directory 2 (files have only 1 tab)    :  Read  files in dir1 using input   tool (*.*)  .  Read files in  dir2  
  2. Files have 1402 rows and 30 columns which need to be compared   :   Transpose  data  
  3. I would like to import all files the same time.  :  input tool  ( *.*  )  will read  all files 
  4. I would like to have one export contain all rows and cells that don't match + add a column with the name of the file in which the error occured for each row.  : Join data ( file name ,  record key , column are keys)  and compare values with formula tool . Filter  rows to include only difference . 
Mikkel94
7 - Meteor

Hi @benakesh,

 

Thank you for your quick response! I think a sample workflow would help a lot.

I attached 4 files:

  • Directory 1: Company A and B
  • Directory 2: Company A and B

File A is different and file B is the same. Based on this I would like to have an export in which only shows the rows that changed and also that the changes relate to company A.

 

I appreciate the help!

benakesh
12 - Quasar

Hi @Mikkel94 ,

The sample wf produces  this output  with list of differences.  Hope this helps .

m941.PNG

 

 

Mikkel94
7 - Meteor

Yes, this works! You just made my day!

Thanks a lot man!

geraldo
13 - Pulsar

hi,


For the sake of knowledge there is a CReW tool that compares 2 files.
The output is like the join tool there are 3 outputs. You can compare all fields or select the desired fields.
At the end of the run if there are critical errors it informs them in the log.


Have to download Alteryx Gallery install. Configure in user settings macro option

 

[]

 

LinK:

 

https://gallery.alteryx.com/#!app/CReW-Delta--Alpha-/5b41141b826fd3116445fee8

 
Labels