Skip to main content
Solved

Getting a parameter through a configuration file

  • May 23, 2025
  • 3 replies
  • 64 views

timotheebecker
Contributor
Forum|alt.badge.img+3

I need to get from an Excel configuration file a parameter for the Buffer distance of a Bufferer transformer.

What’s the best way to do this in order for the parameter to be accessible by the Bufferer transformer ?

I have tried the VariableSetter and VariableRetriever transformers but what I don’t like about it is that I give the value to every feature that passes through VariableRetriever.

Plus the VariableSetter/Retriever method doesn’t work well with cache.

Best answer by jackyd

If you don’t wan’t the buffer value on your features, you could a use a workbench runner
 

Parent workbench would read the excel file, apply any filter and then the workbench runner would trigger the child workbench and pass the buffer distance to a published parameter for the buffer distance in the child workbench.

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

alexbiz
Influencer
Forum|alt.badge.img+28
  • Influencer
  • May 23, 2025

Hey Thimotee, 

You can simply use an Excel Reader to read your configuration file, filter out the value you need, and then use a FeatureMerger to attach that value to all the features going into the Bufferer.

For ease, configure the FeatureMerger like this:

  • Treat your Excel row as the Supplier

  • Treat your dataset as the Requestor

  • Use a constant key (like “1=1”) to join everything

 

That way, you add the buffer distance from your config to every feature.

Note 1: You do need to give each feature the buffer value as an attribute. That’s just how the Bufferer works.

Note 2: I’d stay away from VariableSetter/VariableRetriever. It’s kind of like spaghetti code—harder to debug and doesn’t play nice with caching.


jackyd
Supporter
Forum|alt.badge.img+16
  • Supporter
  • Best Answer
  • May 24, 2025

If you don’t wan’t the buffer value on your features, you could a use a workbench runner
 

Parent workbench would read the excel file, apply any filter and then the workbench runner would trigger the child workbench and pass the buffer distance to a published parameter for the buffer distance in the child workbench.

 


timotheebecker
Contributor
Forum|alt.badge.img+3

Thanks,

That sounds like a nice solution too.