Schema Editing is the process of altering the Writer schema to customize the structure of the output data. One good example is renaming an attribute field.
After editing, the source schema still represents "what we have", but the destination schema now truly does represent "what we want".
There are a number of edits that can be performed, including, but not limited to the following.
Attributes on the destination schema can be renamed, such as renaming POSTALCODE to PSTLCODE.
To rename an attribute open the Feature Type Properties dialog and click the User Attributes tab. Click the attribute to be renamed and enter the new name.
Attribute Type Changes
Any attribute on the writer schema can have a change of type; for example, changing STATUS from a character field to a boolean field.
To change an attribute type open the Feature Type Properties dialog and click the User Attributes tab. Use the Data Type field to change the type of an attribute.
|The Data Type column for an attribute shows only values that match the permitted types for that data format. For example, an Oracle schema permits attribute types of varchar or clob. MapInfo does not support these data types so they would never appear in a MapInfo schema.The above screenshot shows data types for the GML format.|
Feature Type Renaming
To rename a destination feature type (for example, rename PostalAddress to Addresses) open the Feature Type Properties dialog. Click the Parameters tab. Click in the Feature Type Name field and edit the name as required.
You can also rename a feature type by clicking on it in the Workbench canvas and pressing the F2 key.
Geometry Type Changes
To change the permitted geometry for a feature type, (for example, change the permitted geometries from lines to points) open the Feature Type Properties dialog. Click the General tab. Choose from the list of permitted geometries.
This field is only available where the format requires a decision on geometry type. Where formats allow any mix of geometry type in a single feature type, this setting is greyed out.
Once the user has made all the required changes to the Writer schema, the workspace reflects "what we want" - but it doesn't yet specify how the Reader and Writer schemas should be connected together. This is the next task and it is called Schema Mapping.
You might be wondering "what would happen if I edited the Reader schema, instead of the Writer"?
Well, by default, you can't! The schema fields for a Reader are greyed out to stop you, since they would no longer match the Reader dataset.
There are a few, rare, use cases - but they're outside the scope of this training course!