Reader and Writer Questions

From fmepedia



Table of contents

Q) What is the general process for using FME and Smallworld 4?

A) Open the Smallworld FME Interface and select the Objects/Feature Types you wish to work with.

In Workbench create a new workspace to go to or from Smallworld.

Choose the option for 'Import Feature Type Definitions' and the objects defined in the Smallworld Interface are made available within the workspace.

Complete the workspace as usual. You may then run it as you would a regular FME workspace.



Q) How can I turn off the SmallworldGeometryFactory in a v4 Smallworld translation?

A) In the create workspace settings dialog change the service from FME to FMENOFACTORY



Q) What happens if I write data to Smallworld v4 without specifiying the Smallworld geometry name?

A) Then you'll probably get attribute data, but no geometry.



Q) Can I create a join between my Smallworld data and another set of attributes using FME?


A) The simple answer is no. Because FME doesn't have access to the sys_id I don't think there is any way to join information from an external datasource to existing Smallworld data.

In other words you can load a parent table, and you can load a child table but you can't make a join because Smallworld assigns the value for sys_id and not FME.


Apparently it is possible to to access sys_id from a Magik application. Therefore you could write a join key to a spare attribute and then, using a Magik application, copy this value into the sys_id to create the join. I'm told that a good Magik programmer would find this a fairly straightforward task.

However, SpatialBiz FME plugin supports the creation of joins when importing data to Smallworld through a number of approaches:

1: The user can export then import the key, foreign key and intermediate tables directly. During import, SpatialBiz tracks sys_id values and can build the relationships between records based on the source key values. i.e. the source key values only have to be unique and SpatialBiz will then be able to find and replace the foreign key values with the actual generated key values.

2: User defined fields can be specified in the translation which store the value and means to find related records. The @recordFinder() macro can be directed to look for related records and build the relationships during import.


The SpatialBiz FME plugin will return the sys_id field values generated during a translation run (either the Int32 or Int64 forms) for use in FMEObjects applications. In addition the generated sys_id values are retained and automatically used when looking up foreign key values to create Smallworld joins between related records.



Q) If I create a new attribute within Workbench does it get passed on to Smallworld?

A) Not with the standard GE Reader/Writer. FME can’t pass into the magik code, attributes that do not exist in the destination Smallworld object

However, the SpatialBiz FME plugin does support user defined fields as the target for Smallworld translations through the fme_pseudo_field_defs shared constant. This is used internally when creating relationships (joins) in data where it is loaded from source systems which model the relationships differently.

User defined fields can be used in other ways through hook points in the translation process. This functionality is being implemented for SpatialBiz 3.3, scheduled for release with FME 2009.

User Comments Add a new comment