TrueRandomStringGenerator

From fmepedia

The transformer generates random strings of given length and character composition. The values are stores in the _random_string attribute.

The transformer needs the following parameters - string length, three parameters about allowed characters - digits and alpha characters in upper and lower case. The last parameter defines whether the strings should be unique. Note, that if the number of features exceeds the number of unique combination, the translation will fail.

This transformer uses an online service at http://random.org. Randomness is generated via atmospheric noise. See http://www.random.org/clients/http/ for details. The page http://www.random.org/quota/ contains information about quotas.

The attached workspace TrueRandomStringGenerator.fmw generates 10 features with _random_string attribute containing 10 characters strings mixing alphanumeric characters.

See also PasswordGenerator example, which combines random.org online service and raster writing in one workspace.

Note that the maximum number of random string you can get per request (one run) is 10,000.

Note also, that if you supply incorrect parameter combination, an HTTP status code 503 (Service Unavailable) will be returned. To debug the error, you can use the _url generated by the transformer in your browser, which will give you the reason for the error. I filed an enhancement PR, which will allow passing this message onto features.

Attached Files
filesizedate
TrueRandomStringGenerator.fmw66.2 kB02/01/08
User Comments Add a new comment