Skip to main content
Solved

Getting a parameter through a configuration file


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.

 

View original
Did this help you find an answer to your question?

3 replies

alexbiz
Supporter
Forum|alt.badge.img+10
  • Supporter
  • 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
Contributor
Forum|alt.badge.img+11
  • Contributor
  • 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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings