Question

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

  • 10 June 2022
  • 1 reply
  • 1 view

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

1 reply

Badge +2

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