Using FME's Comparison Tool

Liz Sanderson
Liz Sanderson

FME Version

Introduction

One of FME’s strengths is its ability to build complex solutions that apply in multiple departments of an organization. Colleagues often share workspaces and make iterations on those workspaces. Inheriting a workspace from a colleague or working on a workspace together has often resulted in a lot of back and forth and sharing screenshots. FME’s Comparison tool aims to save time and improve on this collaborative experience. 

The Comparison tool in FME allows users to compare two workspaces simultaneously. These differences are represented visually, allowing the user to compare the two workspaces efficiently. Users can choose to copy over elements into the Editable canvas to make changes based on the differences. If you are interested in integrating Git into your Workbench comparison workflow , you are able to do so on the command line, TortoiseGit, and Sourcetree, to interface directly with the Compare Workspaces tool.

The Comparison tool is available in FME 2023.0 or newer and has increased functionality than the previous Workspace Compare and Merge tool that was released in FME 2022. For information on Workspace Compare and Merge, please see the section at the bottom of this article.  

 

Workspace Comparison Essentials

The Comparison tool is composed of a left (Editable), and right (Read-Only) canvas with edit controls in the middle toolbar. Toggle the Help icon in the toolbar to learn more about how to use the comparison tool. 

 

Getting Started with Workspace Comparison

In this article, we’ve provided two simple workspaces for you to test out the functionality of the Comparison tool. In this scenario, we want to copy the over the SpatialFilter in Version1.fmw into Version2.fmw. In this process, we will observe some of the key functionalities of the Compare tool.

 

Comparison tool in FME

1. Download and Unzip the Provided Workspaces and Data

Download the <zipfile name> from the Files section of this article, and then unzip it. 

2. Launch the Workspace Comparison tool



Open FME Workbench, then launch the compare tool by clicking Compare Workspaces from the Start menu, or access through Tools > Compare Workspaces.

Select two workspaces you want to compare. Open Version2.fmw into the Editable (left) selection and Version1.fmw into the Read-only (right) selection




3. View Workspace Differences

You will notice that the SpatialFilter is highlighted yellow as there are differences between the two transformers. The blue highlights on the Editable canvas represent all elements present only on the left. The purple highlights on the Read-Only canvas represent all elements present only on the right. 




4. Make Changes to Workspaces

The SpatialFilter in Version2.fmw is faulty and not working the way we want it to, but we know it used to work in Version1.fmw. We are going to copy over the SpatialFilter from Version1.fmw into Version2.fmw. 

Let's observe these differences first. Double-click on the SpatialFilter to open the transformer properties comparison. You will see that the “Tests to Perform” and “Pass Criteria” are highlighted in yellow showing the differences in those parameters. You can choose to Edit only parts of the transformer from the Properties Comparison window by clicking “Edit…” this will apply the changes immediately to the editable fmw file.  



Instead, we want to copy all differences over. To do this, highlight the Transformer from the summary panel and click “Copy to Left”. This will copy all differences over and immediately re-compare the workspaces.



5. Save Changes

Save your changes to apply the changes to your Workbench files. Happy FMEing!
 

Compare Workspaces in 2022 and Earlier

The Workspace Compare and Merge window was first released under Tech Preview in FME Desktop 2022.0 Build 22268. The initial release of the Workspace Compare and Merge and the current Comparison Tool differs in the layout, language, and overall functionality. 

For FME Desktop 2022.0 and earlier:

  • Green highlight means something has been added to the workspace.
  • Yellow highlight  means something has been modified.
  • Red highlight means something has been deleted. 


Clicking the cogwheel next to changes in the Modified section of the Workspace Comparison window will show the parameters side by side. In this case, we can see the parameters of the FeatureJoiner. Within a transformer, the same methodology applies: added parameters are green, modified parameters are yellow. FME will also highlight if there has been a change in the version as well as new parameters in the transformer.

With Merge mode activated, you can choose the changes that you would like to implement with by clicking the check box next to Total Changes or by Holding CTRL (or Cmd ⌘ on Mac) and clicking checkboxes will let you select each change you want to merge. When you’ve selected the ones you want, click the Merge button again to proceed. 

 

 

Was this article helpful?

Comments

1 comment

  • Comment author
    bo

    Thank you Liz Sanderson for the post, with which we were able to make git diff work on Linux client computer.  Do you have any instructions on Windows computers where WSL is absent?

    0

Please sign in to leave a comment.