Skip to main content
Question

Compare two separate excel files and report on matched and unmatched column name


Forum|alt.badge.img

I have several excel files(from customer) which needs to be validated with source/master excel files which have the appropriate/correct column names - how can we match the excel file(from customer) column names with source/master excel file and report on matched and unmatched(incorrect) column names

6 replies

danilo_fme
Evangelist
Forum|alt.badge.img+42
  • Evangelist
  • May 3, 2019

Hi @mackmk

First - The Xls Reader ( master ) insert on Workbench, but after choose the Parameters -> Field Names Row = 0:

And expose the format Attribute from xls file = xlsx_row_id.

Use the transformer Tester to filter just the Line 1. If you check the Output Port Passed ( after Run ) you can see the values from Attributes A and B.

Second - Input the files from your customer with the same operation above ( that I described ) and use a transformer to compare these values, for example FeatureMerger.

 

If you need more some help, don't hesitate to describe here.

 

Thanks,

Danilo

 


Forum|alt.badge.img
  • Author
  • May 3, 2019
danilo_fme wrote:

Hi @mackmk

First - The Xls Reader ( master ) insert on Workbench, but after choose the Parameters -> Field Names Row = 0:

And expose the format Attribute from xls file = xlsx_row_id.

Use the transformer Tester to filter just the Line 1. If you check the Output Port Passed ( after Run ) you can see the values from Attributes A and B.

Second - Input the files from your customer with the same operation above ( that I described ) and use a transformer to compare these values, for example FeatureMerger.

 

If you need more some help, don't hesitate to describe here.

 

Thanks,

Danilo

 

Hi Danilo - Thanks for your response.

How should I use FeatureMerger - if I use a form id/any column as a joiner(join on) - it would merge all the features...

Thanks,

Mak


danilo_fme
Evangelist
Forum|alt.badge.img+42
  • Evangelist
  • May 3, 2019
mackmk wrote:

Hi Danilo - Thanks for your response.

How should I use FeatureMerger - if I use a form id/any column as a joiner(join on) - it would merge all the features...

Thanks,

Mak

Hi @mackmk

You can use with concatenation attributes:

 

Thanks,

Danilo

 


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • May 3, 2019

I would use the Schema Reader, instead of an Excel reader.

The Schema reader only passes the column names to the workspace, not the data.

Then compare the schema's using the ChangeDetector transformer, to see if the schema's match.


Forum|alt.badge.img
  • Author
  • May 7, 2019

@danilo_fme, @erik_jan Thanks for your replies. I have tried the suggested options but did not get the desired results - not sure if I have set it up right... I have attached the two excel files containing the column names - could you please assist with the workflow?Table1_SourceFile.xlsxTable2_ComparisonFile.xlsx


Forum|alt.badge.img
  • Author
  • May 7, 2019

@danilo_fme, @erik_jan - I think I got it working -this is how it looks now(re snapshot) - used the schema reader, listExploder & FeatureMerger to get the desired outcome - Thanks heaps for your help.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings