Thanks Mark, I think I will give it a try in WB, otherwise I will use a command line script, which is a bit of a less than ideal tool.
Cheers, Igor. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of mark2atsafe Sent: Saturday, 14 April 2007 6:58 a.m. To: [email protected] Subject: [fme] Re: Metadata (attribute types, width, names) read/store from a MID/MIF dataset Hi Igor, I'm thinking that you'll need to use a combined TCL/FMEObjects script, and call it from the workspace using SystemCaller or TCLCaller. It shouldn't be as hard as it sounds (I hope). There are schema reading objects (classes/functions/methods/????) in fme objects, and it appears quite simple to call these within a TCL script. Take a look at http://www.fmepedia.com/index.php/Sandbox <http://www.fmepedia.com/index.php/Sandbox> I posted a TCL script there that does a simple Shape to Shape translation. The translation bit is less important to you, I think the important part would be... FMEFeature SchemaFeature while { [ Reader readSchema SchemaFeature] } { ... } Unfortunately I don't have time at the moment to work it into a proper working example, but hopefully this will help get you started. If you want to use Python instead, then I have this info from a colleague... -------- See the Python SQLite reader for starting point: http://www.fmepedia.com/index.php/Python_SQLite_Reader_Example <http://www.fmepedia.com/index.php/Python_SQLite_Reader_Example> Instead of using SQLite to create a reader, you would need to use an FME reader to open the data, then use readSchema and return the schema features. -------- Hope this helps, 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> , "ialbor" <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > I have created a TCl/FME WB that scans a folder, reads MID/MIFs and > extract "some" attribute/feature metadata, basically to facilitate > reporting inconsistencies in the ETL process. I have not been able to > find the variables in the reader/writer that set/holds the "type" and > "width" parameters of the fields. Has anyone done this type of > manipulation on the attributes of the attributes? > I can read the field value length and type, but that is not what I am > really after. > > Thanks. > > > Igor > ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal ##################################################################################### ********************************************************************** CAUTION: This email and any attachments may contain information that is confidential. If you are not the intended recipient, you must not read, copy, distribute, disclose or use this email or any attachments. If you have received this email in error, please notify us and erase this email and any attachments. You must scan this email and any attachments for viruses. DISCLAIMER: Powerco Limited accepts no liability for any loss, damage or other consequences, whether caused by its negligence or not, resulting directly or indirectly from the use of this email or attachments or for any changes made to this email and any attachments after sending by Powerco Limited. The opinions expressed in this email and any attachments are not necessarily those of Powerco Limited. **********************************************************************
