Skip to main content

I just started using FME and my first goal is to compare values from DWG attributes and Excel rows. Each Excel row corresponds to a DWG file, I use AttributeKeeper to filter out the same number of columns in each transformer and would like to test each column in the DWG file to the Excel file to see if they match. If they don't I want to add that row, where one of the columns is filename, to a new Excel file and output it.

 

I've searched this forum extensively but can't find a topic that matches my specific question. Some help on how to continue would be appreciated.

 

This is an example of my input from both Excel and DWG. I want to know if "Value1" in File1 of the Excel file is the same as "Value1" in "File1" of the DWG file, and so on. The filenames are always the same but the column names differs.

 

1

Multiple ways to do this. I would use a FeatureMerger. Can also be done using a ChangeDetector.


Multiple ways to do this. I would use a FeatureMerger. Can also be done using a ChangeDetector.

Please net me know if you need more explanation.


Please net me know if you need more explanation.

Thank you. FeatureMerger worked to some extent, however:

  • Strings with differences in lowercase/uppercase letters won't merge, is it possible to make the join condition case insensitive?
  • When one or more of the join conditions isn't fulfilled, is there a way to list which Requestors/Suppliers (or which columns) didn't match?

Please net me know if you need more explanation.

  • As far as I know, case sensitivity is not configurable. But I never use the newest versions so double check in a recent beta. Workaround could be to lowercase all input. If you don't want to change the original data, create a temp attribute with the lowercase values.
  • Unmerged Requestors are requestors without supplier.
  • Unused Suppliers are suppliers without requestor.

Please net me know if you need more explanation.

Unmerged Requestors and Unused Suppliers output the entire row with all input columns, so it doesn't tell me which requestor is missing a supplier. Unless I'm missing something? In the FeatureMerger Join On I input each Requestor(Excel column) that needs to match its corresponding Supplier(DWG attribute).


Please net me know if you need more explanation.

I misunderstood your question. The FeatureMerger can't do this.

 

The ChangeDetector is able to produce a list with changes, but then you need a unique ID for both sets, which is not the case if I understand correctly.

 

What I would do is reformat your data to rows with 3 columns:

FileName, AttributeName, AttributeValue.

This can be done with an AttributeExploder. Once you have this, you can then easily compare and find the differences.

 

If this is not what you need, please share some real sample data so we can try to reproduce what you are after. You can either paste some CSV in a comment or attach a .ffs file.


Please net me know if you need more explanation.

I have tried using the AttributeExploder first, but since the filename is one of the features the result is 2 columns (column name and row value) where filename occurs on 1 row for each file. When I input the reults into ChangeDetector I lose track of which file I'm checking for differences. How do I make sure each feature is connected to the correct filename in AttributeExploder?

 

Unfortunately I can't share actual data... Here's a screenshot, AttributeExploder result with 2 files checked:

AttributeExploderMy workspace:

Workspace


Please net me know if you need more explanation.

Please create the sample data in Excel then. I need to have something I can read using workbench, build an example and upload it here. I do not want to invest time in creating sample data with the risk it is different from what you have, sorry.

 

I need 2 sheets, one which represents your excel file and one that represents the dwg output.


Please net me know if you need more explanation.

Understood, here are 2 sheets. To simplify I have used identical column names in both, and there are 2 differences in the date fields that I would like to filter out to a new excel file where it's possible to track which filenames contains differences. Thank you!


Please net me know if you need more explanation.

If the attribute Filename is unique, you can use the ChangeDetector to find the differences. See attached workspace.


Please net me know if you need more explanation.

This is exactly what I'm looking for. Thank you!


Please net me know if you need more explanation.

Cheers 🙂 attaching sample data really helps with understanding the question.


Reply