Monday, July 14, 2014

FME : Validate the attribute names of a feature

Goal : Verify the attribute names of a feature layer in a dataset using FME.

My dataset source is an sdf but this can be done with any reader source FME can read.
I had to use a few transformers to filter the attribute names of the feature layer.

1. First of all you need to use a Sampler to make sure you end up with one single feature instead of the complete dataset.

2. Once you filtered a single feature you use an attributeexploder to aquire the feature's fme attribute names.


3. Next I added a Tester to verify the expected attribute names.

4. I added the result to a list using the listbuilder

5. I used a ListCounter to get the amount of passed tests.


6. I will verify the amount of passed tests against the amount of expected attribute names within the dataset.

7. The failed results are written to a text file using a TEXTWRITER



Voila, thats how you verify whether the expected amount of columns are part of your dataset using FME.

The result can be downloaded here

No comments:

Post a Comment