Skip to main content

Sometimes I really need to use a Group By in a transformer, but the parameter is not available. Is there anyway I can hack it?

Yes, you might be in luck. There is a way to expose the Group By parameter on a transformer. However, please note, there might be a reason certain transformers don’t support Group By, out of the box (e.g. transformers that process each feature individually won't work with a Group By parameter). So please verify the outcome of the translation carefully, and make sure it is producing the expected result, when you use this hack. Here it goes:

  1. Right click on the transformer in question and Create Custom Transformer from it.

     

    (more detail on Custom Transformer )
  2. In the Custom transformer tab, find “Parallel Process By” under Transformer Parameters>Advanced. Right Click and Create User Parameter…

     

    You may consider changing the parameter Prompt to “Group By”

     

    (This part of the advanced training can be helpful here. Although, no need to enable Parallel Processing, if you only want the Group By feature.)
  3. Now the Group by parameter is available to be specified in the Main tab, on the transformer in question.

*If you are using a FME Version earlier then 2019.0, there is a caveat about this hack:

To make Group by work this way, Feature Caching needs to be turned off. (this issue has been fixed and available in 2019.0 beta)


Yes, you might be in luck. There is a way to expose the Group By parameter on a transformer. However, please note, there might be a reason certain transformers don’t support Group By, out of the box (e.g. transformers that process each feature individually won't work with a Group By parameter). So please verify the outcome of the translation carefully, and make sure it is producing the expected result, when you use this hack. Here it goes:

  1. Right click on the transformer in question and Create Custom Transformer from it.

     

    (more detail on Custom Transformer )
  2. In the Custom transformer tab, find “Parallel Process By” under Transformer Parameters>Advanced. Right Click and Create User Parameter…

     

    You may consider changing the parameter Prompt to “Group By”

     

    (This part of the advanced training can be helpful here. Although, no need to enable Parallel Processing, if you only want the Group By feature.)
  3. Now the Group by parameter is available to be specified in the Main tab, on the transformer in question.

*If you are using a FME Version earlier then 2019.0, there is a caveat about this hack:

To make Group by work this way, Feature Caching needs to be turned off. (this issue has been fixed and available in 2019.0 beta)

Another thing to note, if you have enabled the parallel processing group by, feature counts will no longer appear on connections in the custom transformer.

 

 


Another thing to note, if you have enabled the parallel processing group by, feature counts will no longer appear on connections in the custom transformer.

 

 

Hi @jdh, can you share a workspace that demonstrate this issue? I can't seem to reproduce it with the transformer I tried.

 


Hi @jdh, can you share a workspace that demonstrate this issue? I can't seem to reproduce it with the transformer I tried.

 

Here you go @XiaomengAtSafe. Note that there are no feature counts between the Input and Output ports. If you change the parallel processing level from Minimal to No Parallelism, you will see a feature count.

 

 

parallelprocessgroupby.fmw


Here you go @XiaomengAtSafe. Note that there are no feature counts between the Input and Output ports. If you change the parallel processing level from Minimal to No Parallelism, you will see a feature count.

 

 

parallelprocessgroupby.fmw

Ah, I see it now. Thanks @jdh! I'll report it to our developers and see if they can figure out why this is happening.

 


Ah, I see it now. Thanks @jdh! I'll report it to our developers and see if they can figure out why this is happening.

 

I assume it has something do to with how transport sender/receiver works when multiprocessing.

 

 


I assume it has something do to with how transport sender/receiver works when multiprocessing.

 

 

Yeah, just had another discussion on this topic. You are correct, with the current infrustruction, we are not able to get the count, when using parallel processing.


Reply