Thanks Mark and Hans!!!  Hard to believe I haven't been using custom
transformers after all this time.  The rulebase attribute checker is
quite a useful tool and I will certainly be expanding on that, but for
what I need in the short term, a custom transformer will do the trick.
This will greatly impact the flow of most of my workbench files from
here on out.  
 
Thanks again for heading me in the right direction.

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of
mark2atsafe
Sent: Monday, December 04, 2006 1:02 PM
To: [email protected]
Subject: [fme] Re: Global attribute validation



Hi Scott,
If I can add to Hans's answer - a good example of this sort of thing
are the rulebase checker transformers you can get from fmepedia

http://www.fmepedia.com/index.php/Rulebase_Pack
<http://www.fmepedia.com/index.php/Rulebase_Pack> 

In particular the RulebaseAttributeChecker is a good example.

It has a text-based rules file containing schema information, against
which to check the attributes of a feature. Any feature with
non-conforming attributes fails the test and is output from a
different port.

The tests it carries out are attribute name, attribute length (min and
max) and attribute type (int, string, float etc) - but it could be
altered to do any test.

If your schema is more fixed you could build the rules into the
workspace or, if you have some development skills, you could use
Python to read the schema directly from an existing destination
dataset and test against that.

Aside from Custom Transformers, you could also do this as a Custom
Format. This way a user could have the data checked automatically
every time he reads it - even within ArcMap for example, so it is
on-the-fly and doesn't have to be through Workbench. Alternatively....
er you could do it using TCL/Python scripts if you prefer to work with
these sort of tools, but I don't have any examples of this I'm afraid. 

Anyway - I hope this is useful,
Regards,

Mark

Mark Ireland, Senior Product Specialist
Safe Software Inc. Surrey, BC, CANADA
[EMAIL PROTECTED] <mailto:support%40safe.com>  http://www.safe.com
<http://www.safe.com> 
Solutions for Spatial Data Translation, Distribution and Access

--- In [email protected] <mailto:fme%40yahoogroups.com> , Hans van der
Maarel <[EMAIL PROTECTED]> wrote:
>
> Scott,
> 
> > I'm often repeating many steps over and over again in a workbench 
> > file and was just wondering if there was a better approach. To 
> > keep the explanation simple, all I want to do is "scrub" an 
> > attribute at a global level and validate it's type. For example, 
> > is there a way to validate all attributes of type DATE (on 
> > multiple feature classes) and if found invalid, set to NULL (or 
> > whatever). I can do this easy enough at the feature class level 
> > (SDE to SDE), but I want to do it globally.
> > 
> > Programmatically speaking, it would be a very straightforward 
> > solution, but not sure if I can accomplish this type of structure 
> > in Workbench. 
> > If it is possible, I would love to know how as I could use it in 
> > many, many more situations.
> 
> It sounds like a Custom Transformer may do the trick. It's basically 
> a group of transformers with specific settings that act as one (and 
> it shows up in the Workbench transformers list). Settings of the 
> individual transformers can be exposed to become settings of the 
> Custom Transformer.
> 
> Hope this helps.
> -- 
> Hans van der Maarel
> Red Geographics
> www.redgeographics.com / [EMAIL PROTECTED]
>



 

**** For your information: the Rhode Island Operations of New England Gas 
Company have been acquired by National Grid and are now doing business under 
that name.  ****


This e-mail and any files transmitted with it, are confidential to National 
Grid and are intended solely for the use of the individual or entity to whom 
they are addressed.  If you have received this e-mail in error, please reply to 
this message and let the sender know.

Reply via email to