Skip to main content

Hi there,

I'm trying to figure out how VariableSetter/Retriever works.

 

I found this article which is very helpful:https://community.safe.com/s/article/converting-multi-line-records-into-single-features However, I'm a bit confused that there're 48 records when setting VariableSetter, while there're 450 records when using VariableRetriever...How could VariableRetriver work to detect&input those 48 rows' attributes into the 450 records?

 

Great thanks!

The variable will only contain one value. Each time you set the variable you overwrite its previous value.

 

In your example, say each of the 48 features had a attribute containing a number from 1-48, with the first feautre having 1 and the last feature having 48. Each time one of these features passes through the variable setter, the value is changed. Once the last feature passes through, the value will be 48.

 

When each of the 450 features then passes through the variable retriever, they will get the value 48.

 

That's it in its simplest operation. You can have multiple variable setters on different branches setting the same variable, you can have different variable names, your order of operations might be such that not all feautres pass through a variable setter before features pass through a variable retriever....


Thanks@hkingsbury

The original data is like this, and the result perfectly input !MAJOR & AIRPORT BLVD for the original record 2-13 each and similar to later groups...I'm confused how the VariableRetriever identifies the original group and input well.

original:

1 result:

2


Thanks@hkingsbury

The original data is like this, and the result perfectly input !MAJOR & AIRPORT BLVD for the original record 2-13 each and similar to later groups...I'm confused how the VariableRetriever identifies the original group and input well.

original:

1 result:

2

I'm assuming your workflow is something like this....

 

read original data in, use a tester to split non number rows (1,14) and number rows (2-13,15+). Non number rows go to a variable setter, and number rows go to a variable retriever.

 

Because you have no blockng transformers, row one will go to the variable setter and set the variable to !MAJOR and AIRPORT BLVD, rows 2-13 will then go through the variable retriever and get the values !MAJOR and AIRPORT BLVD. Then row 14 will be read in and go through the variable setter, then the variable contains !MAJOR and ED BLUESTEIN. Rows 15+ will then go through the variable retriever and get !MAJOR and ED BLUESTEIN


I'm assuming your workflow is something like this....

 

read original data in, use a tester to split non number rows (1,14) and number rows (2-13,15+). Non number rows go to a variable setter, and number rows go to a variable retriever.

 

Because you have no blockng transformers, row one will go to the variable setter and set the variable to !MAJOR and AIRPORT BLVD, rows 2-13 will then go through the variable retriever and get the values !MAJOR and AIRPORT BLVD. Then row 14 will be read in and go through the variable setter, then the variable contains !MAJOR and ED BLUESTEIN. Rows 15+ will then go through the variable retriever and get !MAJOR and ED BLUESTEIN

Great thanks! I know how Variable Setter/Retriever works finally with your thorough explanations ~


Reply