Skip to main content
Question

Can anyone advise the most efficient way to bulk extract attribute string lengths?

  • June 10, 2022
  • 1 reply
  • 29 views

alsherren
Contributor
Forum|alt.badge.img+2
Can anyone advise the most efficient way to bulk extract attribute string lengths?

1 reply

chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • June 10, 2022

Hi @alsherren​ ,

The StringLengthCalculator is a great option. The other would be the StringLength String Function in an AttributeManager (for example). In an ideal workspace, your features will already be in a bulk mode enabled format like CSV (for example)- you can tell when your features are in feature tables because the feature counts will go up in increments of 10,000 or 100,000 instead of smaller rolling increments.

I did a very simple test of the StringLength Function vs the StringLengthCalculator and here are the results from my setup:

  • StringLengthCalculator: 10,000,000 features processed in 1 minute 31.8 seconds
  • StringLength Function (using an AttributeManager): 1 minute 24.9 seconds

In this case, the string function edged out the transformer by a few seconds. If you are only calculating the length of one attribute, I'd probably just use the transformer, but if you are calculating the length. of multiple attributes, you could do it all in one AttributeManager (compared to multiple StringLengthCalculators) which may help keep your workspace looking nice and tidy.

 

Hope that helps.


Reply


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