Skip to content

Latest commit

 

History

History
60 lines (33 loc) · 3.2 KB

2.03.SchemaEditing.md

File metadata and controls

60 lines (33 loc) · 3.2 KB

Schema Editing

By default, the Writer schema ('what we want') is a mirror image of the source ('what we have'), so the output schema will be a duplicate of the input. This allows users to translate from format to format without further edits (Quick Translation).

If the user requires the output to have a different data structure, then they must carry out Schema Editing.

What is Schema Editing?

Schema Editing is the process of altering the destination schema to customize the structure of the output data. One good example is renaming an attribute field in the output.

After editing, the source schema still represents ‘what we have’, but the destination schema now truly does represent 'what we want.'

Editable Components

There are a number of edits that can be performed, including, but not limited to the following.

Attribute Renaming

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 number 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.


#######TIP 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.


Feature Type Renaming

To rename a destination feature type (for example, rename PostalAddress to Addresses) open the Feature Type Properties dialog. Click the General tab. Click in the Feature Type Name field and edit the name as required.

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.

Next Steps

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.


TIP

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.

[SCREENSHOT]

There are a few, rare, use cases - but they're outside the scope of this training course!