Question

How can I dynamically compare attribute names of two different Readers?


I have an FME-workbench which manipulates data originating from either Excel or Access. Since I want to use the same workbench for dozens of different Excel and/or Access-files and every file has multiple Features, I don't want to create a new Reader every time, but just indicate the path to the corresponding file.

19-07-_2021_17-27-25The data structure is given and supposed to be the same for every input file. However, sometimes that is not the case, i.e. some additional columns are added in one of the Excel Sheets .

 

Now, I am interested in finding additional/missing columns, but that's where I start getting lost...

 

I tried to compare the attributes of my desired Input file and the Example file (with the correct data structure) via Attribute Transposer and ChangeDetector, but it did not work dynamically as the Reader seems to remember and thus keep all the Attributes it has ever seen so far - and not only the attributes actually present in the desired input file.

 

Please let me know if I should give more detailed information!


2 replies

Badge +8

have you tried comparing value from exploding list from features exiting <Schema> port?

it did not really work unfortunately. The first time it works perfectly (i compared my example excel sheet with one of the excel sheets with actual data in it), but when I changed the data source of my reader reading the actual data it still keeps some random attributes from the first input feature (however, not all of them).

 

it is as if the cache is not completely removed...

Reply