Comments and answers for "Best practice for checking attribute values" https://knowledge.亚搏在线safe.com/questions/28083/best-practice-for-checking-attribute-values.html The latest comments and answers for the question "Best practice for checking attribute values" Comment by torbjornd on torbjornd's answer https://knowledge.亚搏在线safe.com/comments/28526/view.html

Thank you.I've tried using the AttributeValidator,but that transformer throws an error when I'm using a attribute value as "upper limit value".If I manually set the limit,it works.This is the error-message:

Illegal operator `RANGE' supplied for test evaluation -- operator must be one of < > <= >= != = ==

Thu,12 May 2016 11:11:01 GMT torbjornd
Answer by mark2at亚搏在线safe https://knowledge.亚搏在线safe.com/answers/28118/view.html

I would go with the AttributeManager using conditional functionality.You don't want a "filter" transformer because you want to just test/set values,not filter the data.You really need a "mapper" transformer.The AttributeRangeMapper would probably work here,but in general we need to implement a mapper transformer that is similar to the conditional tools,but easier to find/understand.

Fri,29 Apr 2016 16:53:03 GMT mark2at亚搏在线safe
Answer by takashi https://knowledge.亚搏在线safe.com/answers/28104/view.html

@torbjornd,if you are looking for a way to merge the limit values to the features from the SQLExecutor,the FeatureMerger might help you.You can set an identical constant (e.g.1) to the "Join One" parameter for both Requestor and Supplier,to merge Supplier's attributes to Requestors unconditionally.

Fri,29 Apr 2016 14:57:53 GMT takashi
Answer by gio https://knowledge.亚搏在线safe.com/answers/28103/view.html

i would go for a attributecreator ( manager in 2016 i believe).

Either use conditional creation (as stated by Rycharge) or use expression or regexp.to do that.

Fri,29 Apr 2016 14:56:33 GMT gio
Answer by erik_jan https://knowledge.亚搏在线safe.com/answers/28102/view.html

The TestFilter is using an If ..Elsif..Else construction.

So if the first test passes the other tests will not be executed.

If your feature fails all conditions only one output will be shown.

If you need all tests to be performed I would go with 5 Testers and connect the Passed port (Value > limit) to an AttributeCreator and route both streams to the next Tester.

This way all tests are performed and possibly 5 result attributes are created.

Fri,29 Apr 2016 13:59:12 GMT erik_jan
Answer by rycharg https://knowledge.亚搏在线safe.com/answers/28097/view.html

Attribute Manager conditional statements are good as well.Basically if you have a database that is centered around the use of drop down lists or there is a finite amount of acceptable values in a column then you can use if statements to check that all values are acceptable,if not then do nothing/change to null/flag it or set a default value for it.AttributeValidator is fantastic for checking exactly why a validation was failed,I believe the transformer creates a column _fme_validation_message.And it states why a record failed and exactly WHERE it failed,which is invaluable for troubleshooting validation problems.Hope this helps :)

Fri,29 Apr 2016 13:14:20 GMT rycharg
Answer by david_r https://knowledge.亚搏在线safe.com/answers/28090/view.html

Have you considered the AttributeValidator that was introduced in FME 2016?

David

Fri,29 Apr 2016 09:42:04 GMT david_r